tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: A nit-pick on gettime(9) man-page
On Wed, Jan 04, 2017 at 05:10:38PM +0800, Paul Goyette wrote:
>
> The system realtime clock is guaranteed to be monotonically
> increasing at all times. As such, all calls to these functions
> are guaranteed to return a system time greater than or equal to
> the system time returned in any previous calls.
>
>
> The guarantee to return a result "greater than or equal to" the previous
> result is a property of a "monotonically non-decreasing" function. A
> "monotonically increasing" function would guarantee a results that is
> strictly greater than any previous results.
It is strictly non-decreasing, but the expectation is that the result
will actually change over time. On a short enough observation interval,
it might be constant though. Time counters are a step function and e.g.
the Intel RTC has a frequency of ~32kHz, so even on slower CPUs it is
easy to observe the constant phases.
Joerg
Home |
Main Index |
Thread Index |
Old Index