RE: time in lib

From: Chemolli Francesco (USI) <ChemolliF@dont-contact.us>
Date: Sun, 6 May 2001 11:41:57 +0200

> -----Original Message-----
> From: Henrik Nordstrom [mailto:hno@hem.passagen.se]
> Sent: Friday, May 04, 2001 12:29 AM
> To: Robert Collins
> Cc: squid-dev@squid-cache.org
> Subject: Re: time in lib
>
>
> Robert Collins wrote:
>
> > Perhaps add squid_curtime as an exprted variable from
> misclib, and move
> > the time routines into a lib. time access is a common thing
> after all.
>
> If any time symbol it to made global I think current_dtime is
> the first
> candidate. It both has more precision and a better name. If
> squid_curtime is to be moved to lib then it should be renamed to
> something saner..
>
> But on the other hand.. measurements have shown that
> gettimeofday() is a
> very quick call, at least on Linux.. think it was somewhere
> around 60 ns
> on my 450MHz Pentium III laptop... (well, this was ofcourse
> from a loop
> all cached in L1 cache but...)
>

It will (if it hasn't already) become even faster.
There has been discussion a couple of months ago
on the linux-kernel mailing list about making this
and a few others sstem calls basically noops
using a "magic" kernel memory page mapped as part
of all processes' address space.
This means that gettimeofday() will become on linux about as
fast as a function call.;)

-- 
	/kinkie 
Received on Sun May 06 2001 - 13:22:14 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:00 MST