title: Execute a function periodically in python for every n milliseconds in python 2
body: <p>I'm wondering how to execute a function in Python for every 10ms. I tried with threading (using <code>threading.Timer(0.001, fun)</code>), but <code>threading.Timer</code> executes properly only up to seconds. Is there any to execute a task/function in ms(milli seconds)?</p>
  
  <p>The code is as follows.</p>
  
  <pre><code>def task():
      print "called every 10ms"
      print time.ctime()
      threading.Timer(0.01,task).start()
  
  task()
  </code></pre>