📄 ticktimer.h
字号:
/*
* ==============================================================================
* Name : TickTimer.h
* Part of : RGA Game Example
* Interface :
* Description : application frame timer
* Version : 1.0
*
* Copyright (c) 2007-2008 Nokia Corporation.
* This material, including documentation and any related
* computer programs, is protected by copyright controlled by
* Nokia Corporation.
* ==============================================================================
*/
#ifndef __TICKTIMER_H__
#define __TICKTIMER_H__
#include <e32hal.h>
#include <e32base.h>
class CTickTimer : public CBase
{
public:
CTickTimer();
virtual ~CTickTimer();
/**
* BeginTimer
* start computing time
*/
void BeginTimer();
/**
* EndTimer
* compute time from last call to 'BeginTimer'
*/
void EndTimer();
/**
* ElapsedSeconds
* @return number of seconds passed in between last calls to
* 'BeginTimer' and 'EndTimer'
*/
inline TReal64 ElapsedSeconds() const { return iElapsedSeconds; }
private:
TInt64 iStartTicks;
TInt64 iEndTicks;
TInt64 iTickFrequency;
TReal64 iRateInverse;
TReal64 iElapsedSeconds;
};
#endif /* __TICKTIMER_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -