How to delay until a next increment of time occurs ?

R.Wieser address at not.available
Thu Nov 14 15:25:39 EST 2019


Dennis,

> Ugh -- let's try Google Drive...

I was able to download them, thanks.    All but the 100uSec one seemed to be 
rather stable.

> That is what I'd thought, but if you've looked at that simple program I
> used, apparently the "run longer" was taking place between the
>
> t +=
>
> and the
>
> t - time.time()

I don't think so, as that "t +=" is relative and depends on the end time of 
the last sleep - just as it should I might say.   And that means that that 
"run longer" can have been taking place anywhere between the end of the last 
sleep and the "t - time.time()" in the new one.

By the way, on my scope the "wrap around" time seemed to be quite long, in 
the neighborhood of 80 uSec

Alas, the drift-compensated sleep did not seem to make the output any more 
dependable - though I hope it means that I do not need to re-tweak the delay 
when running on another Pi than my current one (a 3B+).

Regards,
Rudy Wieser




More information about the Python-list mailing list