4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-21 00:07:36 +08:00

* times.cc (hires_ms::usecs): Correct order when checking if high precision

time is <= current time.
This commit is contained in:
Christopher Faylor 2005-12-13 00:43:46 +00:00
parent a300f5fd14
commit c9da5a2183
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-12-12 Christopher Faylor <cgf@timesys.com>
* times.cc (hires_ms::usecs): Correct order when checking if high
precision time is <= current time.
2005-12-12 Christopher Faylor <cgf@timesys.com>
* pinfo.cc (size_copied): New convenience macro.

View File

@ -642,8 +642,9 @@ hires_ms::usecs ()
if (!inited)
prime ();
LONGLONG t = systime ();
LONGLONG res = initime_us + (((LONGLONG) timeGetTime ()) * 1000LL);
if (res <= systime ())
if (res <= t)
{
inited = false;
prime ();