* 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.
This commit is contained in:
Christopher Faylor
2005-12-07 22:28:49 +00:00
parent c09178b052
commit 6c9a5ebbfc
5 changed files with 50 additions and 32 deletions

View File

@@ -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");