title: Python Thread.start() throws weird exception relating to datetime.datetime
body: <p>I'm using threading.Timer on python 2.74. This is the relevant piece of code:</p>
  
  <pre><code>__lock = threading.Lock()
  def RegeneratePopulationData():
      __lock.acquire()
      print 'I feel regenerated!'
      __lock.release()
  
  def __setRegenerationTimer(firstTime = False):
      global __regenerationTimer
      now = _getNow().date()
      nextRun = datetime(now.year, now.month, now.day + 1, 2, 0)
      __regenerationTimer = threading.Timer((nextRun - _getNow()).total_seconds(), __setRegenerationTimer)
      print 'Regeneration timer set to run in %s' % (nextRun - _getNow())
      print __regenerationTimer.interval
      __regenerationTimer.start()
      if not firstTime:
          RegeneratePopulationData()
  
  def _getNow():
          return datetime.now() + timedelta(hours = TIME_DIF)
  </code></pre>
  
  <p>This cause a TypeError exception to be thrown from threading.py. I've searched the net for hours, and couldn't find a solution.</p>
  
  <p>After changing the code at threading.py (for debugging purposes), around line 349, to:</p>
  
  <pre><code>            # than 20 times per second (or the timeout time remaining).
              print _time()
              print timeout
              endtime = _time() + timeout
              delay = 0.0005 # 500 us -&gt; initial delay of 1 ms
  </code></pre>
  
  <p>This is the exception I'm getting:</p>
  
  <pre><code>Regeneration timer set to run in 2:52:12.337000
  10332.337
  1377634067.66
  10332.337
  1377634067.66
  2013-08-27 21:07:47.663000
  Exception in thread Thread-2:
  Traceback (most recent call last):
    File "C:\Python27\lib\threading.py", line 812, in __bootstrap_inner
      self.run()
    File "C:\Python27\lib\threading.py", line 1082, in run
      self.finished.wait(self.interval)
    File "C:\Python27\lib\threading.py", line 622, in wait
      self.__cond.wait(timeout)
    File "C:\Python27\lib\threading.py", line 350, in wait
      endtime = _time() + timeout
  TypeError: unsupported operand type(s) for +: 'float' and 'datetime.datetime'
  </code></pre>
  
  <p>I can't figure out why the interval is suddenly turning into datetime!</p>
  
  <p>Can anyone please help?</p>