📄 avitimer.h
字号:
#ifndef _AVITIMER_H_
#define _AVITIMER_H_
class AVITimer {
public:
// Class used to calculate elapsed frame time between 2 frames
// Creates a new AVITimer for a capture frame rate (see dwRequestMicroSecPerFrame in CAPTUREPARMS)
AVITimer(long microsec_per_frame):init(clock()),frames_per_clock((double)1000000/(microsec_per_frame*CLOCKS_PER_SEC)){};
// Returns the number of frames elapsed since the creation of the AVITimer
long AddFrame() {
return (long)(frames_per_clock*(clock()-init));
}
protected:
clock_t init;
double frames_per_clock;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -