On Fri, 19 Jun 2020 18:52:40 +0200, Mark Kettenis wrote: > There is one other issue that I wanted to raise. An that is whether > we really need to implement CLOCK_UPTINME as a userland clock. If we > don't do that we can drop tk_naptime from the shared struct. I > mention this because th_naptime was only recently added to struct > timehands and much more an implementation detail than the other fields. > > I don't expect userland processes to call CLOCK_UPTIME in a loop like > they tend to do do for CLOCK_MONOTONIC and CLOCK_REALTIME. Linux > doesn't have it ;).
That's not entirely true. On Linux, CLOCK_MONOTONIC does not count time that the system is suspended so it is analogous to our CLOCK_UPTIME. On Linux CLOCK_BOOTTIME is the clock that counts time while suspended. On OpenBSD CLOCK_BOOTTIME and CLOCK_MONOTONIC are the same but that is not true of other systems. - todd