title: precise time measurement
body: <p>I'm using time.h in C++ to measure the timing of a function. </p>
  
  <pre><code>clock_t t = clock();
  someFunction();
  printf("\nTime taken: %.4fs\n", (float)(clock() - t)/CLOCKS_PER_SEC);
  </code></pre>
  
  <p>however, I'm always getting the time taken as 0.0000. clock() and t when printed separately, have the same value. I would like to know if there is way to measure the time precisely (maybe in the order of nanoseconds) in C++ . I'm using VS2010.</p>