Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Apr 2002 16:20:41 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        John Hay <jhay@icomtek.csir.co.za>
Cc:        hackers@freebsd.org
Subject:   Re: microtime trustworthiness during booting? 
Message-ID:  <19993.1018707641@critter.freebsd.dk>
In-Reply-To: Your message of "Sat, 13 Apr 2002 15:50:10 %2B0200." <200204131350.g3DDoBn69302@zibbi.icomtek.csir.co.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200204131350.g3DDoBn69302@zibbi.icomtek.csir.co.za>, John Hay write
s:
>Hi,
>
>>From what stage during the boot process can I trust that microtime() will
>give me incrementing time?
>
>The reason I ask is that I see microtime() jump backwards consistently
>during the ich_calibrate() function in the ich sound driver. The values
>look basically the same every time. Something like this:
>
>t1 2 sec 389291 usec
>t2 0 sec 32061 usec

Until interrupts work you cannot rely on timecounters.

You should probably use microuptime() not microtime() any case.

>Can it be that there is some kind of glitch somewhere when the TSC
>take over as timecounter?

Unlikely.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@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.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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