chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
debian: Switch to CDBS and support Python 2.6.
[mLib-python]
/
sel-timer.pyx
diff --git
a/sel-timer.pyx
b/sel-timer.pyx
index 6e0071786091713830d495fa2f9211dc17a8bc4c..6bc4e2813acfa3b1e7429b7bad5e3eeaa041c1c4 100644
(file)
--- 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 =
<int>
s
+ tv.tv_usec =
<int>(us * 1000000)
cdef class SelTimer:
cdef sel_timer t