33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
From: tim_one at email.msn.com (Tim Peters)
|
|
Date: Sat, 24 Apr 1999 00:42:18 -0400
|
|
Subject: millisecond time accuracy
|
|
In-Reply-To: <14112.46141.974182.785300@amarok.cnri.reston.va.us>
|
|
Message-ID: <000201be8e0c$d60bc580$f09e2299@tim>
|
|
X-UID: 401
|
|
|
|
[Kevin F. Smith]
|
|
> Is there a way to measure time accurate to milliseconds?
|
|
>
|
|
> For example, by calling the time.time() function I get seconds. Is
|
|
> there a comparable function that I could use to measure interval times
|
|
> down to at least millisecond accuracy?
|
|
|
|
[Andrew Kuchling]
|
|
> Nothing portable. However, time.time() actually returns a floating
|
|
> point number, and the Python implementation tries to use the
|
|
> most precise function available in the C library.
|
|
|
|
OTOH, so does time.clock(), which yields better-than-microsecond resolution
|
|
on most Windows + Intel systems (and where time.time() is much cruder).
|
|
|
|
Note that the Library Ref recommends time.clock() for benchmarking.
|
|
|
|
over-ten-years-a-nanosecond-here-or-there-doesn't-amount-to-much-
|
|
more-than-a-microsecond-ly y'rs - tim
|
|
|
|
|
|
|
|
|
|
|
|
|