title: C Elapsed time linux
body: <p>Sorry I am new to C. But what am I doing wrong? Tried almost everything, but still can not calculate seconds passed to execute the code between t1 and t2, always returns me 
  Finished in 0.00 seconds.
  Thanks for your patience :)</p>
  
  <pre><code>#include &lt;time.h&gt;
  
  clock_t t1, t2;
  
  t1 = clock();
  sleep(5);
  t2 = clock();
  printf("\nFinished in %.2f seconds.\n\n", (t2-t1)*1.0/CLOCKS_PER_SEC);
  </code></pre>