md_timer.h
来自「MDEngine2plus游戏开发库! 用来开发游戏超级简单!」· C头文件 代码 · 共 53 行
H
53 行
// MD_Profile.h: interface for the CMD_Profile class.
//
//////////////////////////////////////////////////////////////////////
#ifndef MD_TIMER_H
#define MD_TIMER_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifdef MDENGINE2P_EXPORTS
#define MDENGINE_API __declspec(dllexport)
#else
#define MDENGINE_API __declspec(dllimport)
#endif
#include "common.h"
class MDENGINE_API CMD_Timer
{
public:
CMD_Timer();
virtual ~CMD_Timer();
public:
void EnableErrMSG(bool bshowerr); // 允许or禁止弹出错误信息
DWORD GetErrCode(void); // 得到错误代码
bool Create();
void Close();
bool IsTimeUp(int ms); // 判断两次调用中时间是否超过ms
int GetFPS(void); // 计算FPS
void LimitFPS(int fps); // 自动限制FPS
static void TimeWait(int wait); // 强制系统等待wait毫秒
private:
void ShowErrMSG();
private:
private:
DWORD m_ErrCode;
bool m_bShowErrMSG;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?