title: Measuring CPU time in c++
body: <p>If I had the following code</p>
  
  <pre><code>clock_t t;
  t = clock();
  //algorithm
  t = clock() - t;
  </code></pre>
  
  <p>t would equal the number of ticks to run the program. Is this the same is CPU time? Are there any other ways to measure CPU time in C++?</p>
  
  <p>OS -- Debian GNU/Linux
  I am open to anything that will work.  I am wanting to compare the CPU time of two algorithms.</p>