⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mrtimer.h

📁 Games programming all in one code chapter 18
💻 H
字号:
 /* 'mrTimer.h' */

 /* Mirus base types header */
#include "mrDatatypes.h"
 /* Windows header file */
#include <windows.h> 
 /* Time header file */
#include <time.h> 

 /* Include this file only once */
#pragma once

 /* Mirus timer class */
class mrTimer
{
protected:
  /* Hardware timer variables */
 LARGE_INTEGER   m_iFrequency;
 LARGE_INTEGER   m_iLastQuery;
 LARGE_INTEGER   m_iDelta;

  /* Time and date variables */
 tm *            m_pkTime;

public:
  /* Constructor / Destructor */
 mrTimer (void);
 ~mrTimer (void);

  /* Update the time variables */
 void Update (void);

  /* Return the timer information */
 mrReal32 GetDelta (void);
 mrUInt32 GetSeconds (void);
 mrUInt32 GetMinutes (void);
 mrUInt32 GetHours (void);
 mrUInt32 GetDay (void);
 mrUInt32 GetMonth (void);
 mrUInt32 GetYear (void);
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -