Subject: | Better handling of the multiple clocks |
Currently all of IO::Async's core is ignorant of the multiple clocks; namely the distinction between CLOCK_MONOTONIC and CLOCK_REALTIME. It blurs the distinction between the two, presuming them to always run exactly in step with each other.
This generally doesn't cause too much trouble, except at those times when they diverge. E.g. when wallclock time is set by administrative action, or by ntpd.
Already occasionally the effects can be seen if there is a small amount of clock rate skew between MONOTONIC (the basis that poll(2) and select(2) use) vs REALTIME (the basis that gettimeofday(2) uses), when sometimes a poll() wait for a calculated time doesn't observe the same amount of time passing according to gettimeofday().
To fix this, we'd need to take account of the clock basis when handling time-related matters.
--
Paul Evans