title: clock() precision in time.h
body: <p>I am trying to calculate the number of ticks a function uses to run and to do so an using the <code>clock()</code> function like so:</p>
  
  <pre><code>unsigned long time = clock();
  myfunction();
  unsigned long time2 = clock() - time;
  printf("time elapsed : %lu",time2);
  </code></pre>
  
  <p>But the problem is that the value it returns is a multiple of 10000, which I think is the <code>CLOCK_PER_SECOND</code>. Is there a way or an equivalent function value that is more precise?</p>
  
  <p>I am using Ubuntu 64-bit, but would prefer if the solution can work on other systems like Windows &amp; Mac OS.</p>