Commit a16e5c61 authored by Denis Bilenko's avatar Denis Bilenko

core: add again() method to timer

parent 4ef2be31
......@@ -579,6 +579,12 @@ cdef public class timer(watcher) [object PyGeventTimerObject, type PyGeventTimer
def __get__(self):
return self._watcher.at
def again(self, object callback, *args):
self.callback = callback
self.args = args
libev.ev_timer_again(self.loop._ptr, &self._watcher)
INCREF
cdef public class signal(watcher) [object PyGeventSignalObject, type PyGeventSignal_Type]:
......
......@@ -107,6 +107,7 @@ cdef extern from "libev.h":
void ev_timer_init(ev_timer*, void* callback, double, double)
void ev_timer_start(ev_loop*, ev_timer*)
void ev_timer_stop(ev_loop*, ev_timer*)
void ev_timer_again(ev_loop*, ev_timer*)
void ev_signal_init(ev_signal*, void* callback, int)
void ev_signal_start(ev_loop*, ev_signal*)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment