* times.cc (hires_ms::usecs): Reinit timer when system time overflows.
This commit is contained in:
parent
81223d017f
commit
fbd5a0b8da
@ -1,3 +1,7 @@
|
|||||||
|
2004-06-30 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* times.cc (hires_ms::usecs): Reinit timer when system time overflows.
|
||||||
|
|
||||||
2004-06-27 Christopher Faylor <me@cgf.cx>
|
2004-06-27 Christopher Faylor <me@cgf.cx>
|
||||||
|
|
||||||
* thread.cc (__cygwin_lock_lock): Don't bother locking when there is
|
* thread.cc (__cygwin_lock_lock): Don't bother locking when there is
|
||||||
|
@ -658,6 +658,12 @@ hires_ms::usecs (bool justdelta)
|
|||||||
if (!minperiod) /* NO_COPY variable */
|
if (!minperiod) /* NO_COPY variable */
|
||||||
prime ();
|
prime ();
|
||||||
DWORD now = timeGetTime ();
|
DWORD now = timeGetTime ();
|
||||||
|
if (now <= initime_ms)
|
||||||
|
{
|
||||||
|
inited = 0;
|
||||||
|
prime ();
|
||||||
|
now = timeGetTime ();
|
||||||
|
}
|
||||||
// FIXME: Not sure how this will handle the 49.71 day wrap around
|
// FIXME: Not sure how this will handle the 49.71 day wrap around
|
||||||
LONGLONG res = initime_us.QuadPart + ((LONGLONG) (now - initime_ms) * 1000);
|
LONGLONG res = initime_us.QuadPart + ((LONGLONG) (now - initime_ms) * 1000);
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user