title: converting time_point to specific duration with chrono
body: <pre><code>/*definition of start and end
  std::chrono::time_point&lt;std::chrono::system_clock&gt; start;
  std::chrono::time_point&lt;std::chrono::system_clock&gt; _end;
  */
  
  std::chrono::time_point&lt;std::chrono::system_clock&gt; someclass::spf()
  {
      _end = std::chrono::system_clock::now();
      std::chrono::time_point&lt;std::chrono::system_clock&gt; time(_end-start);
      start = std::chrono::system_clock::now();
      return time;
  }
  unsigned int someclass::secs()
  {
      return std::chrono::duration_cast&lt;std::chrono::seconds&gt;(spf()).count();
  }
  </code></pre>
  
  <p>Compiler gives me errors for the call of <code>duration_cast</code>. Exact error:</p>
  
  <pre><code>error: no matching function for call to ‘duration_cast(std::chrono::time_point&lt;std::chrono::_V2::system_clock, std::chrono::duration&lt;long int, std::ratio&lt;1l, 1000000000l&gt; &gt; &gt;)’
  </code></pre>