Date: Mon, 15 Apr 2002 19:46:32 +0200 From: Thierry Herbelot <thierry@herbelot.com> To: Poul-Henning Kamp <phk@FreeBSD.ORG> Cc: arch@FreeBSD.ORG Subject: Re: get{bin,micro,nano}[up]time() - what precision ? Message-ID: <3CBB11F8.451D28AB@herbelot.com> References: <54342.1018890897@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote: > > I'm soliciting input from users of the get*time() family of functions > in the kernel on what the minimal desirable precision is. > > Currently they return a timestamp which is no more than 1/HZ out > of date. For contemporary values of HZ, that seems to be adequate. > > As people increase HZ to above 10000, it starts to cost more to > update timecounters every tick, and the question naturally arises: > what is the target resolution for get*time() functions ? > > Would anybody get in trouble if the precision never got better > than 10msec, even for higher HZ ? > > If so, would 1msec be an acceptable limit ? Hello, I am investigating a "centralized clock" appliance, where a number of FreeBSD PCs would spit out a more or less precise date on the Ethernet. The goal would be : all FreeBSD PCs will run NTP, with a local GPS clock, and will peer with the other PCs in order to be hardened against the loss of a GPS box. The FreeBSD PCs only run some kind of endless loop, copying the local, "precise relative to UTC" time on Ethernet packets, sent approximatively once every msec. Thus, I would like to be able to read the local time at 2000Hz to (max) 5000Hz, with the correlative precision. Thus, 1msec seems to be a little short on precision. Cheers TfH > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CBB11F8.451D28AB>