lkml.org 
[lkml]   [1999]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectgettimeofday()
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.018 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site