title: Measure FPS and Execution Time in c++ and matlab
body: <p>Does anyone know how to measure the FPS or execution time for C++ and for MATLAB?  I'm looking for a correct way to measure that.  I want to make a simple program (like edge detection in MATLAB or using OpenCV with C++) and want to compare the resultant speed of processing.</p>
  
  <p>Some algorithms compute the time in milliseconds and others in microseconds.</p>
  
  <p>I've found several ways to do it in C++, like using <code>time_t start</code> and <code>time_t end</code> (Processor time by clock) and calendar time.  For MATLAB they use <code>tic</code> and <code>toc</code> to compute time.</p>
  
  <p>Also, for C++ I have also find this method:  <a href="https://www.dropbox.com/s/nb33hc3wumcpxb2/Timer.PDF" rel="nofollow">https://www.dropbox.com/s/nb33hc3wumcpxb2/Timer.PDF</a></p>
  
  <p>I want to find the same method for computing time that follows the exact procedure in both C++ and MATLAB.</p>