title: Comparison of Duration/Seconds in C++ using chrono doesnt work as supposed?
body: <p>EDIT: Works just fine, I messed up in another place of my code.</p>
  
  <p>I am trying to increase an Integer once every minute, using C++11 chrono library. For some reasons, the comparison does not work as it should: It just returns true every time. Is something wrong with the cast to seconds? Shouldn't the result be an int, containing the difference of both time points in seconds?</p>
  
  <p>Would really appreciate your help! Here's the Code:</p>
  
  <pre><code>std::chrono::time_point&lt;std::chrono::system_clock&gt; starttime = std::chrono::system_clock::now();
  
  int timeLine = 0;
  
  int main() {
      while (true) {
          std::chrono::time_point&lt;std::chrono::system_clock&gt; now = std::chrono::system_clock::now();
  
          int seconds = timeLine * 60;
  
          if ((std::chrono::duration_cast&lt;std::chrono::seconds&gt;(starttime - now)).count() + seconds &lt;= 0) {
              timeLine++;
              nextConstellation();
              cout &lt;&lt; "Timeline: " &lt;&lt; timeLine &lt;&lt; endl;
  
          }
      }
  }
  </code></pre>