title: How to get a timestamp in Dart?
body: <p>I've been learning Dart, but I don't know how to generate a timestamp. I have tried this:</p>
  
  <pre><code>void main() {
    print((new Date()).millisecondsSinceEpoch);
  }
  </code></pre>
  
  <p>Thanks to the IDE I was able to get this far, but
  I'm getting a confusing error:</p>
  
  <pre><code>Exception: No such method: 'Date'
  </code></pre>
  
  <p>Help?</p>