From owner-freebsd-hackers Fri Nov 3 10: 8:15 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id AEF0437B4C5 for ; Fri, 3 Nov 2000 10:08:12 -0800 (PST) Received: from jade (jade.cs.binghamton.edu [128.226.140.161]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with ESMTP id NAA18286; Fri, 3 Nov 2000 13:01:30 -0500 (EST) Date: Fri, 3 Nov 2000 13:01:17 -0500 (EST) From: Zhiui Zhang X-Sender: zzhang@jade To: Poul-Henning Kamp Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: granularity of gettimeofday() In-Reply-To: <920.973271386@critter> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 3 Nov 2000, Poul-Henning Kamp wrote: > In message , Zhiui Zhang writes: > > > >The manual says the granularity of gettimeofday() is hardware dependent. > >The time may be updated continuously or in clock ticks. Can anyone > >explain for me the two different ways of updating the time? What kind of > >hardware can help? > > You probably need to tell me what you need first... This is actually a question from the book "Kernel Project for Linux" and I am a TA for an operating system course that uses this textbook. I know a little bit of NTP and Intel Time stamp counter. I need an authoritive answer for this question because I do not have the time to go through the FreeBSD code to find out myself in a short time. My impression is that if the time is updated by an interrupt handler per tick, it can not get a microsecond granularity. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message