title: How does python threading.Timer determine elapsed time?
body: <p>I'm running some experiments in a virtual machine, which has its system time updated if its suspended. I want to know if I can suspend the virtual machine and not affect the timer. That is, does Timer use system time or wall time? </p>
  
  <p>I've tried looking through the source code and got to <code>_thread.lock.acquire</code> before the code dips into C.</p>
  
  <p>Below is my code. I delegate to a subprocess that outputs 'plans'. I keep collecting these plans until the optimal plan is found or the maximum allowed time has elapsed. The timer is used to terminate the process if time runs out (which is the expected state of affairs). I need to know that the <code>Timer</code> will not be effected by system time being updated as it will invalidate the experiment I'm running.</p>
  
  <pre><code>p = Popen(args, stdout=PIPE, cwd=self.working_directory)
  timer = Timer(float(self.planning_time), p.terminate)
  timer.start()
  
  plan = None
  while True:
      try:
          plan = list(decode_plan_from_optic(self.decode(p.stdout), 
                      report_incomplete_plan=True))
      except IncompletePlanException:
          break
  timer.cancel()
  </code></pre>