mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
py_tevent: add_timer takes float argument
We were already using it that way. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
parent
076f30b060
commit
8294e68a41
@ -478,9 +478,13 @@ static PyObject *py_tevent_context_add_timer(TeventContext_Object *self, PyObjec
|
||||
{
|
||||
struct timeval next_event;
|
||||
PyObject *callback;
|
||||
if (!PyArg_ParseTuple(args, "lO", &next_event, &callback))
|
||||
double secs, usecs;
|
||||
if (!PyArg_ParseTuple(args, "dO", &secs, &callback)){
|
||||
return NULL;
|
||||
|
||||
}
|
||||
next_event.tv_sec = secs;
|
||||
usecs = (secs - next_event.tv_sec) * 1000000.0;
|
||||
next_event.tv_usec = usecs;
|
||||
return py_tevent_context_add_timer_internal(self, next_event, callback);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user