title: subtract two times in python
body: <p>I have two <code>datetime.time</code> values, <code>exit</code> and <code>enter</code> and I want to do something like:</p>
  
  <pre><code>duration = exit - enter
  </code></pre>
  
  <p>However, I get this error:</p>
  
  <blockquote>
    <p>TypeError: unsupported operand type(s) for -: 'datetime.time' and
    'datetime.time</p>
  </blockquote>
  
  <p>How do I do this correctly? One possible solution is converting the <code>time</code> variables to <code>datetime</code> variables and then subtruct, but I'm sure you guys must have a better and cleaner way.</p>