Determining actual elapsed (wall-clock) time

zooko zooko at zooko.com
Thu Jul 7 09:48:34 EDT 2005


The traditional use of gettimeofday() to (insecurely and unreliably)
approximate elapsed local time is one of my pet peeves.

Fortunately a real monotonic clock has finally been added to the linux
kernel and glibc:

http://www.imperialviolet.org/page24.html#e474

If you have a recent enough kernel and glibc you can use that.  On
Windows you can use system timers and handle wraparound yourself.

And you can write an abstract Pythonic layer over both and give it to
me.  ;-)




More information about the Python-list mailing list