title: Cast chrono::milliseconds to uint64_t?
body: <p>Assuming I have the number of milliseconds in variable <code>x</code>:</p>
  
  <pre><code>chrono::milliseconds x = std::chrono::duration_cast&lt;chrono::milliseconds&gt;(something);
  </code></pre>
  
  <p>how do I convert <code>x</code> from <code>chrono::milliseconds</code> to <code>uint64_t</code>?</p>
  
  <p>I have tried:</p>
  
  <pre><code>uint64_t num = std::chrono::duration_cast&lt;uint64_t&gt;(x);
  </code></pre>
  
  <p>but it says:</p>
  
  <blockquote>
    <p>no matching function for call to
    duration_cast(std::chrono::milliseconds&amp;)</p>
  </blockquote>