… | |
… | |
1820 | C<repeat> value), or reset the running timer to the C<repeat> value. |
1820 | C<repeat> value), or reset the running timer to the C<repeat> value. |
1821 | |
1821 | |
1822 | This sounds a bit complicated, see L<Be smart about timeouts>, above, for a |
1822 | This sounds a bit complicated, see L<Be smart about timeouts>, above, for a |
1823 | usage example. |
1823 | usage example. |
1824 | |
1824 | |
|
|
1825 | =item ev_timer_remaining (loop, ev_timer *) |
|
|
1826 | |
|
|
1827 | Returns the remaining time until a timer fires. If the timer is active, |
|
|
1828 | then this time is relative to the current event loop time, otherwise it's |
|
|
1829 | the timeout value currently configured. |
|
|
1830 | |
|
|
1831 | That is, after an C<ev_timer_set (w, 5, 7)>, C<ev_timer_remaining> returns |
|
|
1832 | C<5>. When the timer is started and one second passes, C<ev_timer_remain> |
|
|
1833 | will return C<4>. When the timer expires and is restarted, it will return |
|
|
1834 | roughly C<7> (likely slightly less as callback invocation takes some time, |
|
|
1835 | too), and so on. |
|
|
1836 | |
1825 | =item ev_tstamp repeat [read-write] |
1837 | =item ev_tstamp repeat [read-write] |
1826 | |
1838 | |
1827 | The current C<repeat> value. Will be used each time the watcher times out |
1839 | The current C<repeat> value. Will be used each time the watcher times out |
1828 | or C<ev_timer_again> is called, and determines the next timeout (if any), |
1840 | or C<ev_timer_again> is called, and determines the next timeout (if any), |
1829 | which is also when any modifications are taken into account. |
1841 | which is also when any modifications are taken into account. |