diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-13 00:43:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-13 00:43:46 +0000 |
commit | c9da5a2183c06038d07b6aa13482392f9054b94c (patch) | |
tree | faa03a6df6c67e7b77654c0e3e1018efbd52c783 /winsup | |
parent | a300f5fd14bc7d8c89e1350415e53b6ba4f45956 (diff) | |
download | newlib-c9da5a2183c06038d07b6aa13482392f9054b94c.zip newlib-c9da5a2183c06038d07b6aa13482392f9054b94c.tar.gz newlib-c9da5a2183c06038d07b6aa13482392f9054b94c.tar.bz2 |
* times.cc (hires_ms::usecs): Correct order when checking if high precision
time is <= current time.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/times.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7db1ebf..e26e0c7 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 793864a..09343c7 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 (); |