Comment from Anonymous is not 100% valid. Time from sleep function is not counted to execution time because sleep delays program execution (see http://www.php.net/manual/en/function.sleep.php and comments). We tested it and it's true. Try this:
<?php
set_time_limit(2);
sleep(4);
echo 'hi!';
sleep(4);
echo 'bye bye!';
?>
It means, that if the loop most of the time will be at sleep (and in this case it probably be), then this script may be active for months or years even if you set time limit to one day.