title: Understanding timedelta
body: <p>Given the python code below, please help me understand what is happening there.</p>
  
  <pre><code>start_time = time.time()
  time.sleep(42)
  end_time = time.time()
  
  uptime = end_time - start_time
  
  human_uptime = str(datetime.timedelta(seconds=int(uptime)))
  </code></pre>
  
  <p>So I get the difference between <code>start time</code> and <code>end time</code>, on line 5 I round up the duration by casting and what now, what's the further explanation?</p>
  
  <p>I know what delta means(average or difference), but why do I have to pass <code>seconds = uptime</code> to <code>timedelta</code> and why does the string casting works so nicely that I get <code>HH:MM:SS</code> ?</p>