OSDN Git Service

Improve clock_gettime and utimensat resolution.
authorericb <ericb>
Tue, 13 Oct 2009 02:26:33 +0000 (02:26 +0000)
committerericb <ericb>
Tue, 13 Oct 2009 02:26:33 +0000 (02:26 +0000)
commitb5da7fc39bcafcceb0a122a114159af3190d13b0
tree7a8ad51c4e2d1b225333254cb0da9df93c14b063
parente1e858d448de4a4df76822a88fa817529ed873b6
Improve clock_gettime and utimensat resolution.

* hires.h (hires_ms): Change initime_us to initime_ns, with 10x
more resolution.
(hires_ms::nsecs): New prototype.
(hires_ms::usecs, hires_ms::msecs, hires_ms::uptime): Adjust.
* times.cc (systime_ns): New helper function.
(hires_ms::prime): Use it for more resolution.
(hires_ms::usecs): Change to...
(hires_ms::nsecs): ...with more resolution.
(clock_gettime): Use more resolution.
(systime): Rewrite in terms of systime_ns.
(timespec_to_filetime): Rewrite math to reflect true operation.
* fhandler_disk_file.cc (utimens_fs): Use higher resolution.
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/hires.h
winsup/cygwin/times.cc