Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-12-13 15:38:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-12-13 15:38:12 +0400
commit74365d9715432f55a2395b443c0dc3fc37b84e33 (patch)
treeed57a1464265615c899f163b8af93483f3191ba8 /winsup
parent8cb58e85662d1a0c3288020780ce2389850dc465 (diff)
* times.cc (hires_ns::resolution): Don't return less than 1.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/times.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9b3cb0276..a88c92bfb 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-13 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * times.cc (hires_ns::resolution): Don't return less than 1.
+
2011-12-12 Christopher Faylor <me.cygwin2011@cgf.cx>
* cygthread.h (cygthread::name): Very minor formatting tweak.
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 3fdab13aa..4f4c39c92 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -718,7 +718,7 @@ hires_ns::resolution ()
return (long long) -1;
}
- return (LONGLONG) freq;
+ return (freq <= 1.0) ? 1LL : (LONGLONG) freq;
}
UINT