X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/d8d81d1b049836f7d4fae7b0077a8ce9e2fc43ac..3655f952feb7cd89371dd65fb78e1435e50f9bcc:/sel-timer.pyx diff --git a/sel-timer.pyx b/sel-timer.pyx index 6e00717..6bc4e28 100644 --- a/sel-timer.pyx +++ b/sel-timer.pyx @@ -30,8 +30,8 @@ cdef double _tvtofloat(timeval *tv): cdef void _floattotv(timeval *tv, double t): cdef double s, us us = modf(t, &s) - tv.tv_sec = s - tv.tv_usec = us * 1000000 + tv.tv_sec = s + tv.tv_usec = (us * 1000000) cdef class SelTimer: cdef sel_timer t