OSDN Git Service

Implement POSIX.1-2004 Monotonic Clock.
authoryselkowitz <yselkowitz>
Mon, 9 Aug 2010 16:47:43 +0000 (16:47 +0000)
committeryselkowitz <yselkowitz>
Mon, 9 Aug 2010 16:47:43 +0000 (16:47 +0000)
commit42cd9c4719ee6bf25cc4b032cdeeeafc73909286
tree4311aa57dc283d027c3b28fba1a18bb5f98e39bb
parenta68dd8522b81193f05c2b3799a747d5e811a58d6
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.
winsup/cygwin/ChangeLog
winsup/cygwin/hires.h
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/strace.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/times.cc