[Box Backup-dev] Re: [Box Backup] Win32 port
Chris Wilson
boxbackup-dev at fluffy.co.uk
Mon Dec 5 18:50:39 GMT 2005
Hi Charles,
On Mon, 5 Dec 2005, Charles Lecklider wrote:
> Sleep is a Windows API call which takes a number of milliseconds to
> sleep. It really should be Sleep(0) - that gives up the timeslice,
> rather than entering a kernel wait for all of 1ms. Same effect, more
> friendly to the system.
Thanks for spotting that. Shows how much I know about the Win32 API :-)
Anyway, if we want the timeout to work properly, shouldn't we keep track
of wall clock time rather than assuming that the system will sleep for
exactly 1ms, or whatever a timeslice happens to be? Anyone know a Win32
API function to get the wall clock time with millisecond resolution or
better?
Cheers, Chris.
--
_ ___ __ _
/ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |
More information about the Boxbackup-dev
mailing list