title: 'datetime.datetime' object has no attribute 'microseconds'
body: <p>I am writing a script in <em>python</em> and I need to know how many milliseconds are between two points in my code.</p>
  
  <p>I have a global variable when the program starts like this:</p>
  
  <pre><code>from datetime import datetime
  a=datetime.now()
  </code></pre>
  
  <p>When I need to know how many milliseconds have passed, I execute this:</p>
  
  <pre><code>  b=datetime.now()
    print (b.microseconds-a.microseconds)*1000
  </code></pre>
  
  <p>However I get this error:</p>
  
  <pre><code>AttributeError: 'datetime.datetime' object has no attribute 'microseconds'
  </code></pre>
  
  <p>What's wrong? How can I fix this?</p>