From c9da5a2183c06038d07b6aa13482392f9054b94c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 13 Dec 2005 00:43:46 +0000 Subject: [PATCH] * times.cc (hires_ms::usecs): Correct order when checking if high precision time is <= current time. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/times.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7db1ebfdc..e26e0c736 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-12-12 Christopher Faylor + + * times.cc (hires_ms::usecs): Correct order when checking if high + precision time is <= current time. + 2005-12-12 Christopher Faylor * pinfo.cc (size_copied): New convenience macro. diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 793864a7a..09343c742 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -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 ();