cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: sleep on win32 (was: retry doesn't work on win32?)

From: Daniel Beardsmore <public_at_telcontar.net>
Date: Wed, 17 Jan 2007 20:08:45 +0000

Victor Snezhko wrote:
> Hi all,
>
> The best way to sleep on win32 known to me is to do:
>
> ping -n secs+1 127.0.0.1 > nul
>
> It's even recommended in some FAQ from Microsoft...

I guess you can always count on Microsoft to come up with a perverted
way to achieve a task, especially since they're too mean and stingy to
give away their real sleep.exe tool. I just did a search: Windows
Resource Kits all ship with a copy of sleep.exe by the looks of it. I
suppose I should just be grateful that uptime.exe was a free download,
but there are plenty of sites that offer free sleep.exe programs too, it
seems.

That said, the above trick at least doesn't waste any CPU, so it's viable.
Received on 2007-01-17