📄 highresolutiontimer.h
字号:
/**
@file
Interface of a win32 timer with high resolution
*/
#if !defined _HIGHRESOLUTIONTIMER_H_
#define _HIGHRESOLUTIONTIMER_H_
#include <windows.h>
namespace Win
{
/**
HighResolutionTimer class, encapsulates the Win32 high resolution
timer */
class HighResolutionTimer
{
public:
/**
start the clock
@exception throws Win::Exception upon failure */
explicit HighResolutionTimer();
/**
@return the ticks passed since last reset */
LARGE_INTEGER Ticks();
/**
@return the number of ticks in one second */
LARGE_INTEGER Frequency();
/**
resets the clock */
void InitBase();
private:
LARGE_INTEGER _frequency;
LARGE_INTEGER _base;
};
}
#endif //_HIGHRESOLUTIONTIMER_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -