summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/times.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7db1ebfdc..e26e0c736 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
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.
(winpids::add): Alias the element that we are working on for slightly
better clarity. Honor the "make_copy" flag.
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 ();