bug report: [ #447945 ] time.time() is not non-decreasing
Skip Montanaro
skip at pobox.com
Sat Aug 4 16:29:11 EDT 2001
zooko> Hm. strace tells me that this is what is happening:
...
zooko> gettimeofday({996940586, 982859}, NULL) = 0
zooko> gettimeofday({996940586, 976989}, NULL) = 0
...
Okay, I think I understand now. The tv_usec field in a timeval struct
represents microseconds. Apparently something about your system (the kernel
or hardware clock, most likely) does not have microsecond resolution, so
most of the bits in the tv_usec field are garbage. This may be something
that could be addressed in Python's configuration (a little C program that
measures the resolution of gettimeofday), but I'm no expert on timekeeping,
so I don't know what's necessary. If you could amend your bug report with
the strace output it would be helpful to whoever gets assigned your bug
report.
Skip
More information about the Python-list
mailing list