From a1126cf45833747c44c858e12e11de93ef60f693 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 Apr 2012 01:45:49 +0200 Subject: [PATCH] PEP 418: Fix time.steady() pseudo-code GetTickCount[64] returns a number of milliseconds, not a number of seconds. --- pep-0418.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep-0418.txt b/pep-0418.txt index fd55f25ef..ed2b0e421 100644 --- a/pep-0418.txt +++ b/pep-0418.txt @@ -97,7 +97,7 @@ Pseudo-code [#pseudo]_:: # GetTickCount64() requires Windows Vista, Server 2008 or later if hasattr(time, '_GetTickCount64'): def steady(): - return _time.GetTickCount64() + return _time.GetTickCount64() * 1e-3 else: def steady(): ticks = _time.GetTickCount() @@ -105,7 +105,7 @@ Pseudo-code [#pseudo]_:: # Integer overflow detected steady.delta += 2**32 steady.last = ticks - return ticks + steady.delta + return (ticks + steady.delta) * 1e-3 steady.last = 0 steady.delta = 0