title: std::chrono::duration_cast - any unit more precise than nano-second?
body: <p>I wanted to ask that how can I calculate time in any units like picosecond, femtosecond and up to  more precision. I am calculating running times for functions and using nanoseconds, the running time of functions is returning 0 when i use millisecond or nanosecond. I think Chrono library supports only till nanosecond, It was the most precise which appeared when I pressed ctrl+space after typing chrono::</p>
  
  <pre><code>int main()
  {
      auto t1 = std::chrono::high_resolution_clock::now();
      f();
      auto t2 = std::chrono::high_resolution_clock::now();
      std::cout &lt;&lt; "f() took "
                &lt;&lt; std::chrono::duration_cast&lt;std::chrono::milliseconds&gt;(t2 - t1).count()
                &lt;&lt; " milliseconds\n";
  }
  </code></pre>
  
  <p>code source: <a href="http://en.cppreference.com/w/cpp/chrono/duration/duration_cast" rel="noreferrer">http://en.cppreference.com/w/cpp/chrono/duration/duration_cast</a></p>
  
  <p>Thanks.</p>