Python, Raspberry pi, call a task avery 10 milliseconds precisely
问题 I'm currently trying to have a function called every 10ms to acquire data from a sensor. Basically I was trigerring the callback from a gpio interupt but I changed my sensor and the one I'm currently using doesn't have a INT pin to drive the callback. So my goal is to have the same behaviour but with an internal interupt generated by a timer. I tried this from this topic import threading def work (): threading.Timer(0.25, work).start () print(time.time()) print "stackoverflow" work () But