home *** CD-ROM | disk | FTP | other *** search
/ ftp.hitl.washington.edu / ftp.hitl.washington.edu.tar / ftp.hitl.washington.edu / pub / people / habib / kodak / frame_rate.h < prev    next >
C/C++ Source or Header  |  2000-04-18  |  840b  |  22 lines

  1. #include <time.h>
  2. #include <iostream.h>
  3.  
  4. class ClassFrameRate
  5. {
  6. public :
  7.     ClassFrameRate();
  8. private :
  9.   int frame_rate;
  10.     int counter_time; // To calculate the frame rate or the time a function is taking, and if this time
  11.     int counter_time2;// is of the order of 0.1 seconds, we should calculate an average of at least 20
  12.                       // passes through this function because the precision of clock is about 0.05 
  13.                       // seconds. Why? who the hell knows why...
  14.     clock_t start, finish;  // to be used with clock() ex: start = clock(); which reads the clock.
  15.     clock_t start2, finish2;// to be used with clock() ex: start = clock(); which reads the clock.
  16. public :
  17.     int PrintAverageFR (int marra)            ; // Prints the Average Frame Rate of marra frames.
  18.     float GetElapsedTime (int marra, float time); // Guess...
  19.  
  20. };
  21.  
  22.