Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 1996 06:21:31 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        FreeBSD-hackers@FreeBSD.ORG, Mattias.Gronlund@sa.erisoft.se
Subject:   Re: iostat
Message-ID:  <199602231921.GAA26638@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Because of the need for better time percision the implementation
>curently uses microtime to get the time, but this is'nt realy that
>good, because it is possible for it to go backward! So if someone
>think that this is something that could be usefull for FreeBSD I
>would love to rewrite it for a simple clock that only should be
>useful to get delta times from, but with high percisiton.

Just fix microtime().

I have seen the clock go backwards a couple of times recently:

Feb 20 01:12:39 alphplex /kernel: FreeBSD 2.2-CURRENT #735: Mon Feb 19 07:27:53 EST 1996
Feb 20 01:12:39 alphplex /kernel:     bde@alphplex.bde.org:/a/obj/sys/compile/nprof
Feb 20 01:12:39 alphplex /kernel: Calibrating clock(s) relative to mc146818A clock ... i586 clock: 132622890 Hz, i8254 clock: 1193105 Hz
Feb 20 01:12:39 alphplex /kernel: CPU: Pentium (132.62-MHz 586-class CPU)
Feb 20 01:12:39 alphplex /kernel:   Origin = "GenuineIntel"  Id = 0x52b  Stepping=11
Feb 20 01:12:39 alphplex /kernel:   Features=0x1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
...
Feb 20 03:25:30 alphplex /kernel: calcru: negative time: -70873 usec
...
Feb 21 01:33:10 alphplex /kernel: FreeBSD 2.2-CURRENT #738: Tue Feb 20 21:53:27 EST 1996
Feb 21 01:33:10 alphplex /kernel:     bde@alphplex.bde.org:/a/obj/sys/compile/nprof
Feb 21 01:33:10 alphplex /kernel: Calibrating clock(s) relative to mc146818A clock ... i586 clock: 132622874 Hz, i8254 clock: 1193105 Hz
Feb 21 01:33:10 alphplex /kernel: CPU: Pentium (132.62-MHz 586-class CPU)
...
Feb 23 19:54:54 alphplex /kernel: calcru: negative time: -314 usec

I've never seen this on i486 systems.

No time daemons or users running `date' or adjtime() were active.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602231921.GAA26638>