chiark / gitweb /
sel-timer: Pyrex now wants explicit truncations to integer.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 23 Jul 2007 15:04:37 +0000 (16:04 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 21 Sep 2008 15:19:11 +0000 (16:19 +0100)
sel-timer.pyx

index 6e00717..6bc4e28 100644 (file)
@@ -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 = <int>s
+  tv.tv_usec = <int>(us * 1000000)
 
 cdef class SelTimer:
   cdef sel_timer t