--- EV/EV.pm 2009/03/14 16:24:27 1.113 +++ EV/EV.pm 2009/04/15 19:35:53 1.114 @@ -204,6 +204,48 @@ is the time that (relative) timers are based on, and referring to it is usually faster then calling EV::time. +=item EV::now_update + +=item $loop->now_update + +Establishes the current time by querying the kernel, updating the time +returned by C in the progress. This is a costly operation and +is usually done automatically within C. + +This function is rarely useful, but when some event callback runs for a +very long time without entering the event loop, updating libev's idea of +the current time is a good idea. + +=item EV::suspend + +=item $loop->suspend + +=item EV::resume + +=item $loop->resume + +These two functions suspend and resume a loop, for use when the loop is +not used for a while and timeouts should not be processed. + +A typical use case would be an interactive program such as a game: When +the user presses C<^Z> to suspend the game and resumes it an hour later it +would be best to handle timeouts as if no time had actually passed while +the program was suspended. This can be achieved by calling C +in your C handler, sending yourself a C and calling +C directly afterwards to resume timer processing. + +Effectively, all C watchers will be delayed by the time spend +between C and C, and all C watchers +will be rescheduled (that is, they will lose any events that would have +occured while suspended). + +After calling C you B call I function on the given +loop other than C, and you B call C +without a previous call to C. + +Calling C/C has the side effect of updating the event +loop time (see C). + =item $backend = EV::backend =item $backend = $loop->backend