Lines Matching refs:timer

57      // initialise a timer watcher, then start it
159 When libev detects a usage error such as a negative timer interval, then
791 C<ev_resume> directly afterwards to resume timer processing.
870 - Sleep if the I/O and timer collect interval say so.
952 will try to invoke timer/periodic callbacks and I/O callbacks with minimum
956 allows libev to delay invocation of I/O and timer/periodic callbacks
992 saving power, as the program will "bundle" timer callback invocations that
1091 watcher type, e.g. C<ev_TYPE_start> can mean C<ev_timer_start> for timer
1428 in has occurred (such as a timer expiring), it will become pending. It will
1434 an expired non-repeating timer can be pending but no longer active). If it
1497 the timer a lower priority than the I/O watcher ensures that I/O will be
1556 In the "real" world, it might also be beneficial to start a timer, so that
1607 use C<SIGALRM> and an interval timer, just to be sure you won't block
1814 =item 1. Use a timer and stop, reinitialise and start it on activity.
1819 ev_timer_init (timer, callback, 60., 0.);
1820 ev_timer_start (loop, timer);
1825 ev_timer_stop (loop, timer);
1826 ev_timer_set (timer, 60., 0.);
1827 ev_timer_start (loop, timer);
1830 some activity, libev will first have to remove the timer from its internal
1834 =item 2. Use a timer and re-start it with C<ev_timer_again> inactivity.
1843 the timer, and C<ev_timer_again> will automatically restart it if need be.
1851 ev_init (timer, callback);
1852 timer->repeat = 60.;
1853 ev_timer_again (loop, timer);
1857 ev_timer_again (loop, timer);
1862 timer->repeat = 30.;
1863 ev_timer_again (loop, timer);
1865 This is slightly more efficient then stopping/starting the timer each time
1867 remove and re-insert the timer from/into its internal data structure.
1871 =item 3. Let the timer time out, but then re-arm it as required.
1884 ev_timer timer;
1900 // activity. simply restart the timer to time out
1917 and simply start the timer with this timeout value.
1930 the timer:
1933 ev_init (&timer, callback);
1934 callback (EV_A_ &timer, 0);
1943 providing a new value, stopping the timer and calling the callback, which
1947 ev_timer_stop (EV_A_ &timer);
1948 callback (EV_A_ &timer, 0);
1965 When there is some activity, remove the timer from the list, recalculate
1990 If you ask a timer to call your callback after three seconds, then
2006 yourself). If you schedule a one-second timer at the time 500.9, then the
2018 the callback at system time 502, or 1.1s after the timer was started.
2040 ev_timer_set (&timer, after + (ev_time () - ev_now ()), 0.);
2065 or C<ev_now> from when you started your timer and when your callback is
2118 Configure the timer to trigger after C<after> seconds. If C<repeat>
2120 reached. If it is positive, then the timer will automatically be
2124 The timer itself will do a best-effort at avoiding drift, that is, if
2125 you configure a timer to trigger every 10 seconds, then it will normally
2127 keep up with the timer (because it takes longer than those 10 seconds to
2128 do stuff) the timer will not fire more than once per event loop iteration.
2132 This will act as if the timer timed out, and restarts it again if it is
2141 =item If the timer is pending, the pending status is always cleared.
2143 =item If the timer is started but non-repeating, stop it (as if it timed
2146 =item If the timer is repeating, make the C<repeat> value the new timeout
2147 and start the timer, if necessary.
2156 Returns the remaining time until a timer fires. If the timer is active,
2161 C<5>. When the timer is started and one second passes, C<ev_timer_remaining>
2162 will return C<4>. When the timer expires and is restarted, it will return
2176 Example: Create a timer that fires after 60 seconds.
2188 Example: Create a timeout timer that times out after 10 seconds of
2199 ev_timer_again (&mytimer); /* start timer */
2251 =item * absolute timer (offset = absolute time, interval = 0, reschedule_cb = 0)
2259 =item * repeating interval timer (offset = offset within interval, interval > 0, reschedule_cb = 0)
2288 Note also that there is an upper limit to how often a timer can fire (CPU
2325 This can be used to create very complex timers, such as a timer that
2354 timer fires or C<ev_periodic_again> is being called.
2359 take effect when the periodic timer fires or C<ev_periodic_again> is being
2366 the periodic timer fires or C<ev_periodic_again> is being called.
2734 the timer callback).
2819 static ev_timer timer;
2832 /* reset the one-second timer */
2833 ev_timer_again (EV_A_ &timer);
2839 ev_timer_init (&timer, timer_cb, 0., 1.02);
2940 I/O and timer callbacks will never actually be called (but must be valid
3022 // create io watchers for each fd and a timer before blocking
3113 // create/start timer
3118 // stop timer again
3524 This function combines a simple timer and an I/O watcher, calls your
3858 about the newly added timer. By waking up the loop it will pick up any new
4031 =item C<ev::io>, C<ev::timer>, C<ev::periodic>, C<ev::idle>, C<ev::sig> etc.
4160 =item w->again () (C<ev::timer>, C<ev::periodic> only)
4162 For C<ev::timer> and C<ev::periodic>, this invokes the corresponding
4751 Replaces the small 2-heap for timer management by a faster 4-heap, larger
4796 your program might be left out as well - a binary starting a timer and an
4851 timer and periodics heaps, libev uses a 4-heap when this symbol is defined
4861 timer and periodics heaps, libev can cache the timestamp (I<at>) within
5370 =item Starting and stopping timer/periodic watchers: O(log skipped_other_timers)
5376 =item Changing timer/periodic watchers (by autorepeat or calling again): O(log skipped_other_timers)
5378 That means that changing a timer costs less than removing/adding them,
5394 =item Finding the next timer in each loop iteration: O(1)
5396 By virtue of using a binary or 4-heap, the next timer is always found at a