gettimeofday()

Michael K Vance (mkv102@psu.edu)
Fri, 01 Jan 1999 17:31:12 -0500


Hello,

I thought I saw someone mention a few weeks ago some issues with
gettimeofday(). I noticed today while I was profiling some matrix math
optimizations that timeval.tv_usec seemed to be wrapping quickly. A typical
output:

start time: 915229599s
finish time: 915229609s
time diff: 10s

start time: 746072us
finish time: 605152us
time diff: -140920us

The first uses tv_sec, and the second one tv_usec. There /is/ about ten
seconds pause between the successive calls. By my calculations, tv_usec should
wrap every 31 minutes or so on an x86. Am I missing something?

m.

-- 
"When I gave food to the poor, they called me a saint.
 When I asked why the poor were hungry, they called me a communist."
 -- Dom H. Camara

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/