title: system_clock returning negative time c++
body: <p>I'm writing code to time a for loop, and I used code given to me by my professor, and it uses system_clock. 
  My problem is that on one of my for loops that I am timing, it is returning a negative time. Sometimes it's different number, but always negative. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>std::chrono::time_point&lt;std::chrono::system_clock&gt; start2, end2;
  int sum2 = 0;
  std::cout &lt;&lt; "Sum on reference ";
  start2 = std::chrono::system_clock::now();
  for(int i = 0; i &lt; 10000; i++)
  {
      sum2 = secondSum(dr);
  }
  end2 - std::chrono::system_clock::now();
  std::chrono::duration&lt;double&gt; elapsed_seconds2 = end2 - start2;
  std::cout &lt;&lt; "sum: " &lt;&lt; sum2 &lt;&lt; std::endl;
  std::cout &lt;&lt; "Elapsed time for data processing on reference: " &lt;&lt; elapsed_seconds2.count() &lt;&lt; "s\n";
  </code></pre>
  
  <p>Where dr is a reference to a struct with a filled array inside and secondSum is a function that sums different values inside that array.</p>