diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-07 22:28:49 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-07 22:28:49 +0000 |
commit | 6c9a5ebbfcb3de5c66e83aae630a6a44124ad372 (patch) | |
tree | c195b15a15c2df4ef5b6ecc64291053ac3735dc9 /winsup/cygwin/hires.h | |
parent | c09178b052512d51998d03b1a26991192d239ac5 (diff) | |
download | cygnal-6c9a5ebbfcb3de5c66e83aae630a6a44124ad372.tar.gz cygnal-6c9a5ebbfcb3de5c66e83aae630a6a44124ad372.tar.bz2 cygnal-6c9a5ebbfcb3de5c66e83aae630a6a44124ad372.zip |
* hires.h (hires_ms::initime_ms): Delete.
(hires_ms::initime_us): Just define as LONGLONG.
(hires_ms::uptime): New function.
* select.cc (select_stuff::wait): Use gtod for timing to attempt to avoid
windows 32 bit wraparound.
* times.cc (systime): New function.
(times): Replace GetTickCount with gtod.uptime.
(hires_us::prime): Use systime() to calculate system time rather than calling
GetSystemTimeAsFileTime directly.
(hires_ms::prime): Ditto. Eliminate initime_ms.
(hires_ms::usecs): Try harder to detect wraparound.
* fhandler_proc.cc (format_proc_partitions): Set drive_size to zero to avoid a
compiler warning.
Diffstat (limited to 'winsup/cygwin/hires.h')
-rw-r--r-- | winsup/cygwin/hires.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h index ddc670568..3c7bd2722 100644 --- a/winsup/cygwin/hires.h +++ b/winsup/cygwin/hires.h @@ -39,13 +39,14 @@ class hires_us : hires_base class hires_ms : hires_base { - DWORD initime_ms; - LARGE_INTEGER initime_us; + LONGLONG initime_us; void prime (); public: LONGLONG usecs (); + LONGLONG msecs () {return usecs () / 1000LL;} UINT dmsecs () { return timeGetTime (); } UINT resolution (); + LONGLONG uptime () {return (usecs () - initime_us) / 1000LL;} }; extern hires_ms gtod; |