yes, that is correct. which is why i would suggest not using it for a production server.
The reason for using sleep inside the while loop is because sleep suspends the process and hence there is no noticable CPU utilization until the next check.
---
cheers!
san
print length "The answer to life, universe & everything!
133tcamel, do you know if using syscall...with a call to something like WAIT...suspends the process? I would like to "sleep" for less than 1 second, but I don't think I can do that with the sleep command.
if you'd like to sleep for less than a second, try using Time::HiRes. It allows you to sleep in microseconds.
There is also something about file triggers (linux), i once browsed in a book which could be a TIMTOWTDI. But I wouldn't go that route unless really neccessary.
---
cheers!
san
print length "The answer to life, universe & everything!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.