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
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2010-08-09 20:47:48 +0400
committerYaakov Selkowitz <yselkowi@redhat.com>2010-08-09 20:47:48 +0400
commitb150f5236b5dd8318bb9fef8188517894e3f186c (patch)
treeab518fe7711d0c3867cfdb56e1eb2a7703c7377a /winsup/cygwin/strace.cc
parentf717289618baa1a709a7b6d5d91c4904fe2426a1 (diff)
Implement POSIX.1-2004 Monotonic Clock.
* hires.h: Change hires_us to hires_ns, with nanosecond resolution. (hires_ns::primed_ft): Remove. (hires_ns::nsecs): New prototype. (hires_ns::usecs): Rewrite in terms of nsecs. (hires_ns::resolution): New prototype. * times.cc: Change hires_us to hires_ns. (ntod): Declare. (systime): Remove. (hires_ns::prime): Increase resolution to nanoseconds. (hires_ns::nsecs): Rename usecs to nsecs to reflect increased resolution. Remove justdelta argument. (hires_ns::resolution): New function. (clock_gettime): Accept CLOCK_MONOTONIC. Use EINVAL instead of ENOSYS per POSIX.1-2004. (clock_getres): Ditto. (clock_setres): Use EINVAL instead of ENOSYS to conform with other implementations. * strace.cc (strace::microseconds): Adjust for hires_ns. * sysconf.cc (sca): Set _SC_MONOTONIC_CLOCK to _POSIX_MONOTONIC_CLOCK. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/strace.cc')
-rw-r--r--winsup/cygwin/strace.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index 4670f8a9a..64999831e 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -74,8 +74,8 @@ strace::hello ()
int
strace::microseconds ()
{
- static hires_us now;
- return (int) now.usecs (true);
+ static hires_ns now;
+ return (int) now.usecs ();
}
static int __stdcall