0

Sample code

interval = 1e-6
threading.Timer( interval, func ).start()

What is the smallest interval one can use reliably? Experimentation got me 1e-6, but wondering if there is a precise value.

Jet Blue
  • 5,109
  • 7
  • 36
  • 48
  • I'm sure it depends on your hardware. If you're running Python on a jerry-rigged whose internal clock only runs at 1Hz, Any interval smaller than `1` obviously won't work :) – Adam Smith Mar 30 '16 at 23:24

1 Answers1

0

It is completely dependent on the OS and python implementation. Generally, you shouldn't expect timer to be high precision. Windows has around a 10-13 ms sleep resolution and I expect it to be a similar case for threading.Timer().

Community
  • 1
  • 1
Natecat
  • 2,175
  • 1
  • 17
  • 20