Getting milliseconds in Python

Diez B. Roggisch deetsNOSPAM at web.de
Wed Feb 16 11:41:45 EST 2005


mjs7231 wrote:

> "Return the time as a floating point number expressed in seconds since
> the epoch, in UTC. Note that even though the time is always returned as
> a floating point number, not all systems provide time with a better
> precision than 1 second. While this function normally returns
> non-decreasing values, it can return a lower value than a previous call
> if the system clock has been set back between the two calls. "
> 
> This is no good, I am looking for milliseconds, not seconds.. as stated
> above.

If your system _can_ provide better accuracy than seconds, it is returned as
fraction of a second. That is the whole point the result of time being a
float and not an int.

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list