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:
authorChristopher Faylor <me@cgf.cx>2005-12-08 01:28:49 +0300
committerChristopher Faylor <me@cgf.cx>2005-12-08 01:28:49 +0300
commit6c9a5ebbfcb3de5c66e83aae630a6a44124ad372 (patch)
treec195b15a15c2df4ef5b6ecc64291053ac3735dc9 /winsup/cygwin/select.cc
parentc09178b052512d51998d03b1a26991192d239ac5 (diff)
* 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/select.cc')
-rw-r--r--winsup/cygwin/select.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 1350a2b03..073e8bcad 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -276,7 +276,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
continue;
}
- DWORD start_time = GetTickCount (); /* Record the current time for later use. */
+ LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */
debug_printf ("m %d, ms %u", m, ms);
for (;;)
@@ -330,7 +330,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
}
select_printf ("recalculating ms");
- DWORD now = GetTickCount ();
+ LONGLONG now = gtod.msecs ();
if (now > (start_time + ms))
{
select_printf ("timed out after verification");