3 ms·
All such delays should be done uses monotonic clocks. This simplistic solution runs still into problems when you have long delays, especially if the system susp
by russdill 2y ago
All such delays should be done uses monotonic clocks. This simplistic solution runs still into problems when you have long delays, especially if the system suspends and/or power cycles. Or if you want the interval to always expire at some wall clock aligned time, such as every half hour on the half hour.
- yuliyp 2y agoA monotonic clock is a bit trickier when dealing with timestamps being written to / read from a separate database, but I agree with the sentiment. Hence why the chosen implementation was buggy :-)
- russdill 2y agoI've commonly seen a kick the can down the road type of solution to issues like these, especially in vehicle systems where a monotonic clock is always used but a entry is included that gives a mapping between wall clock and monotonic if it's available.