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 >
Wrap
C/C++ Source or Header
|
2000-04-18
|
840b
|
22 lines
#include <time.h>
#include <iostream.h>
class ClassFrameRate
{
public :
ClassFrameRate();
private :
int frame_rate;
int counter_time; // To calculate the frame rate or the time a function is taking, and if this time
int counter_time2;// is of the order of 0.1 seconds, we should calculate an average of at least 20
// passes through this function because the precision of clock is about 0.05
// seconds. Why? who the hell knows why...
clock_t start, finish; // to be used with clock() ex: start = clock(); which reads the clock.
clock_t start2, finish2;// to be used with clock() ex: start = clock(); which reads the clock.
public :
int PrintAverageFR (int marra) ; // Prints the Average Frame Rate of marra frames.
float GetElapsedTime (int marra, float time); // Guess...
};