On 11/13/2019 9:02 AM, R.Wieser wrote:

I'm writing some code to toggle a pin on a Raspberry Pi, and would like to
have that happen at (multiples of) 300 uSec increments.

If you were looking at increments of multiple milleseconds, such as 1/60 == 16.6..., I would suggest using tkinter's root.after, with a minimum non-zero delay of 1 millesecond. I believe one can do better with async as its default loop runs a bit faster and there is a C-coded replacement available, which should be faster yet. It has delay-until(time) as well as delay-for(interval).

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to