Not really an answer to your question (since I believe sleep() is not the culprit), but ... did you consider making this a service? It really isn't hard. See Win32::Daemon and Win32::Daemon::Simple.
Jenda
In reply to Re: Sleep has high cpu
by Jenda
in thread Sleep has high cpu
by slojuggler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |