in reply to DBI messes up sleep
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(); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI messes up sleep
by perljunky (Sexton) on Sep 14, 2007 at 21:17 UTC | |
by ikegami (Patriarch) on Sep 14, 2007 at 21:18 UTC | |
by eric256 (Parson) on Sep 14, 2007 at 23:17 UTC | |
by pilcrow (Sexton) on Sep 15, 2007 at 05:00 UTC | |
by eric256 (Parson) on Sep 17, 2007 at 14:53 UTC | |
by ikegami (Patriarch) on Sep 17, 2007 at 19:37 UTC | |
|