Sleep is woken by signals. Perhaps some are being used by the database driver. Just keep going back to sleep until you want to wake up.
# Optional, but a good idea with short durations. use Time::HiRes qw( sleep time ); sub uninterrupted_sleep { my ($duration) = @_; die if !$duration; my $sleep_till = time() + $duration; while ($duration > 0) { sleep($duration); $duration = $sleep_till - time(); } }
In reply to Re: DBI messes up sleep
by ikegami
in thread DBI messes up sleep
by perljunky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |