hundreds of seconds?
Diez B. Roggisch
deets at nospam.web.de
Wed Oct 11 16:43:34 CEST 2006
eur.van.andel at gmail.com wrote:
> Hi all
> How can I access partial seconds on the system clock?
> I measure air speed and water flow in a heat-exchanger test stand and
> count pulses from both water meter and air speed meter. I divide the
> amount of these counts over a certain interval with the time of that
> interval. Since I only have seconds, I need to wait 100 seconds for may
> calculation is I want a precision of 1%.
> The radiator fan that I use can't stand these long intervals, 'cause I
> run it with 24V and 50 Amps to get decent airflow (10m/s) through my
> heat exchanger.
> Again: how do I get the hundreds of seconds from the system clock?
> In Pascal it was: GetTime( Hr1, Min1, Sec1, cSec1); (yes, I'm that
time.time() returns the system time in seconds since the epoch (1970). The
fractional part is relevant.
However, be aware that your OS may limit the precision here. I'm not sure,
but I think Windows for example doesn't get faster than 10th or 100th of a
For more precise timing, you might need a special library/extension that
works with the cpu timer register or something like that.
More information about the Python-list