title: How to store time from chrono inside a double?
body: <p>I have a class with private member:</p>
  
  <pre><code>std::chrono::duration&lt;double&gt; _time;
  </code></pre>
  
  <p>and inside a member function I have:</p>
  
  <pre><code>auto time = std::chrono::high_resolution_clock::now();
  auto deltaTime  = time - _time;
  .
  .
  .
  _time = time;
  </code></pre>
  
  <p>I want to use <code>deltaTime</code> for other things that require a double value, but I don't know how to turn it into one. All the chrono tutorials just seem to print the result and never change it into a double...</p>
  
  <p>eg..</p>
  
  <pre><code>double dTime = convert(deltaTime); // converts time to nanoseconds
  </code></pre>