You miss the point. CLOCK_MONOTONIC may simply be too granular
on some hardware - returning the same value for the duration of
several milliseconds.
Wait, what? Is that a thing? Is there actual hardware where
CLOCK_MONOTONIC stalls for a noticeable period of time?
That does not sound permitted by POSIX:
> If the Monotonic Clock option is supported, all implementations shall
support a clock_id of CLOCK_MONOTONIC defined in <time.h>. This clock
represents the monotonic clock for the system. For this clock, the value
returned by clock_gettime() represents the amount of time (in seconds
and nanoseconds) since an unspecified point in the past (for example,
system start-up time, or the Epoch). This point does not change after
system start-up time.
Since it's the same language as in the definition of CLOCK_REALTIME,
I've always interpreted that as CLOCK_MONOTONIC being mandated to have
the same granularity as CLOCK_REALTIME.
--
Laurent
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox