Re: can I ask question about a bug of gettimeofday here?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think your point is, it is a libc bug on my platform. :-)

BTW: I am using Linux.


regards,
George

----- Original Message ----
From: Tim Prince <tprince@xxxxxxxxxxxxx>
To: Lin George <george4academic@xxxxxxxxx>
Cc: gcc-help@xxxxxxxxxxx
Sent: Friday, February 9, 2007 10:44:10 PM
Subject: Re: can I ask question about a bug of gettimeofday here?


Lin George wrote:
> I am not sure whether it is the correct place to ask a bug of gettimeofday here.
> ..
> I found sometimes the time will not be increased, but will be decreased. It does not happen each time, but happens rarely.
>   
gettimeofday() is platform dependent, and not a part of gcc.  If you 
want details, you should at least look at the source code for your 
implementation (e.g. glibc).  It is likely that your system hardware has 
relatively low resolution (e.g. 0.001 sec at best) for the date/time 
clock, and gettimeofday() has to make some compromise to interpolate, 
for example by using CPU clock ticks.  That would have pitfalls such as 
variations in clock speed, or discrepancies between your CPUs.


 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux