Using struct timeval in python

sapsi saptarshi.guha at gmail.com
Sat Sep 8 19:45:04 CEST 2007


Hi,
I am using a library (pcapy) that returns a timeval object T=
(seconds,microseconds) where microseconds is always < 1e6.
Is there a Python class that can handle timeval structs? Specifically,
I wish to subtract two T (defined above) objects, taking into account
the large values of T[0] and T[1] (esp T[0])?

At one point, I would have to step in, since T[0] rolls back to zero
(after some time).

Any pointers?
Thanks in advance
Saptarshi




More information about the Python-list mailing list