long-run repeatly timer?
hongqn at gmail.com
Fri Nov 12 10:12:05 CET 2004
I asked this question on comp.python.wxpython using the subject "a
wx.Timer like timer without wx package?" and David Fraser there
suggested me to ask here for a more general solution.
I am implementing a long-run sample-and-record system. It collects data
from a PCI card every 10 seconds, saves the data (timestamped with the
current system time) in the hard disk, and shows them on the screen.
There is also a GPS receiver module exists on the system, which correct
the system time (and the hardware time) when it drifts away too much,
however, I can not access the source code of this module.
The system requires the average sample rate is 6 times per minute to
analysis. If the OS clock runs too fast or too slow, we can get the
infomation by the GPS module's log file, and then correct the analysised
result with that infomation.
So, wo need the counter (a repeatly timer for collecting data) to meet
1. fires 6 times per minute, or to say, fires 60*24*360 times per 60 days.
2. will not be affected by the change of system time, foreward or backward.
3. no need for external hardware device, of cource.
4. not depend on any GUI package for it's a console based app.
5. works on a Windows mechine, cross-platform solution is better.
How can I implement such a timer? Thanks in advance.
More information about the Python-list