title: How to get time in milliseconds or nanoseconds in C++
body: <p>The thing is about getting time in C++ in form of milliseconds or nanoseconds. However I only know the way to get time in seconds like this:</p>
  
  <pre><code>#include &lt;ctime&gt;
  ...
  time = ctime(0) ;
  ...
  </code></pre>
  
  <p>I want to know how to do similar operation to get time in milliseconds or nanoseconds. What headers I should include, what functions to call and what are their arguments ?</p>