ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.295 by root, Wed Oct 28 02:42:06 2009 UTC vs.
Revision 1.296 by root, Tue Nov 17 01:19:49 2009 UTC

362this "current" time will differ substantially from the real time, which 362this "current" time will differ substantially from the real time, which
363might affect timers and time-outs. 363might affect timers and time-outs.
364 364
365When this is the case, you can call this method, which will update the 365When this is the case, you can call this method, which will update the
366event loop's idea of "current time". 366event loop's idea of "current time".
367
368A typical example would be a script in a web server (e.g. C<mod_perl>) -
369when mod_perl executes the script, then the event loop will have the wrong
370idea about the "current time" (being potentially far in the past, when the
371script ran the last time). In that case you should arrange a call to C<<
372AnyEvent->now_update >> each time the web server process wakes up again
373(e.g. at the start of your script, or in a handler).
367 374
368Note that updating the time I<might> cause some events to be handled. 375Note that updating the time I<might> cause some events to be handled.
369 376
370=back 377=back
371 378

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines