Timekeeping [Was: Re: cvs commit: src/usr.bin/vmstat vmstat.c
src/usr.bin/w w.c]
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Oct 21 10:19:57 PDT 2005
In message <435921F1.5E9050AD at networx.ch>, Andre Oppermann writes:
>> >IMO it's this:
>> >
>> > Uptime is the time the operating was available to present it's common
>> > services to userland. That excludes any suspend and ddb times. Single
>> > user mode however counts because the OS was servicing userland even if
>> > there was only one user. Uptime is represented in SI seconds.
>>
>> I can live with this definition.
>>
>> So now we just need to be able to reliably measure the "not-uptime".
>
>Umm... Whenever the onesec tick is not incrementing the uptime (and
>monotonic) counter. Which conviniently already is the case when OS is
>suspended or in DDB.
Uhm, yes. Only...
How do we measure the time our clock does _not_ tick ?
We need to use another clock for that.
The RTC comes to mind, but it's precision leaves a lot to be
desired.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the cvs-src
mailing list