ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.229 by root, Wed Apr 15 17:49:27 2009 UTC vs.
Revision 1.230 by root, Wed Apr 15 18:47:07 2009 UTC

1324year, it will still time out after (roughly) one hour. "Roughly" because 1324year, it will still time out after (roughly) one hour. "Roughly" because
1325detecting time jumps is hard, and some inaccuracies are unavoidable (the 1325detecting time jumps is hard, and some inaccuracies are unavoidable (the
1326monotonic clock option helps a lot here). 1326monotonic clock option helps a lot here).
1327 1327
1328The callback is guaranteed to be invoked only I<after> its timeout has 1328The callback is guaranteed to be invoked only I<after> its timeout has
1329passed, but if multiple timers become ready during the same loop iteration 1329passed. If multiple timers become ready during the same loop iteration
1330then order of execution is undefined. 1330then the ones with earlier time-out values are invoked before ones with
1331later time-out values (but this is no longer true when a callback calls
1332C<ev_loop> recursively).
1331 1333
1332=head3 Be smart about timeouts 1334=head3 Be smart about timeouts
1333 1335
1334Many real-world problems involve some kind of timeout, usually for error 1336Many real-world problems involve some kind of timeout, usually for error
1335recovery. A typical example is an HTTP request - if the other side hangs, 1337recovery. A typical example is an HTTP request - if the other side hangs,
1624timers, such as triggering an event on each "midnight, local time", or 1626timers, such as triggering an event on each "midnight, local time", or
1625other complicated rules. This cannot be done with C<ev_timer> watchers, as 1627other complicated rules. This cannot be done with C<ev_timer> watchers, as
1626those cannot react to time jumps. 1628those cannot react to time jumps.
1627 1629
1628As with timers, the callback is guaranteed to be invoked only when the 1630As with timers, the callback is guaranteed to be invoked only when the
1629point in time where it is supposed to trigger has passed, but if multiple 1631point in time where it is supposed to trigger has passed. If multiple
1630periodic timers become ready during the same loop iteration, then order of 1632timers become ready during the same loop iteration then the ones with
1631execution is undefined. 1633earlier time-out values are invoked before ones with later time-out values
1634(but this is no longer true when a callback calls C<ev_loop> recursively).
1632 1635
1633=head3 Watcher-Specific Functions and Data Members 1636=head3 Watcher-Specific Functions and Data Members
1634 1637
1635=over 4 1638=over 4
1636 1639

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines