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 >
Text File  |  2000-04-18  |  824b  |  21 lines

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