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

Comparing libev/ev.pod (file contents):
Revision 1.433 by root, Fri May 2 07:05:42 2014 UTC vs.
Revision 1.434 by root, Tue May 6 13:24:39 2014 UTC

2029 2029
2030The relative timeouts are calculated relative to the C<ev_now ()> 2030The relative timeouts are calculated relative to the C<ev_now ()>
2031time. This is usually the right thing as this timestamp refers to the time 2031time. This is usually the right thing as this timestamp refers to the time
2032of the event triggering whatever timeout you are modifying/starting. If 2032of the event triggering whatever timeout you are modifying/starting. If
2033you suspect event processing to be delayed and you I<need> to base the 2033you suspect event processing to be delayed and you I<need> to base the
2034timeout on the current time, use something like this to adjust for this: 2034timeout on the current time, use something like the following to adjust
2035for it:
2035 2036
2036 ev_timer_set (&timer, after + ev_now () - ev_time (), 0.); 2037 ev_timer_set (&timer, after + (ev_time () - ev_now ()), 0.);
2037 2038
2038If the event loop is suspended for a long time, you can also force an 2039If the event loop is suspended for a long time, you can also force an
2039update of the time returned by C<ev_now ()> by calling C<ev_now_update 2040update of the time returned by C<ev_now ()> by calling C<ev_now_update
2040()>. 2041()>, although that will push the event time of all outstanding events
2042further into the future.
2041 2043
2042=head3 The special problem of unsynchronised clocks 2044=head3 The special problem of unsynchronised clocks
2043 2045
2044Modern systems have a variety of clocks - libev itself uses the normal 2046Modern systems have a variety of clocks - libev itself uses the normal
2045"wall clock" clock and, if available, the monotonic clock (to avoid time 2047"wall clock" clock and, if available, the monotonic clock (to avoid time

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines