mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 01:17:55 -05:00
e16249b672
* define MxLong/MxULong The "long" type has different sizes on different platforms, and this may cause issues. * use DWORD to match RegQueryValueExA arg
33 lines
541 B
C++
33 lines
541 B
C++
#ifndef MXTIMER_H
|
|
#define MXTIMER_H
|
|
|
|
#include "mxcore.h"
|
|
|
|
// VTABLE 0x100dc0e0
|
|
// SIZE 0x10
|
|
class MxTimer : public MxCore
|
|
{
|
|
public:
|
|
MxTimer();
|
|
|
|
void Start();
|
|
void Stop();
|
|
|
|
__declspec(dllexport) MxLong GetRealTime();
|
|
|
|
inline MxLong GetTime()
|
|
{
|
|
if (this->m_isRunning)
|
|
return s_LastTimeCalculated;
|
|
else
|
|
return s_LastTimeCalculated - this->m_startTime;
|
|
}
|
|
|
|
private:
|
|
MxLong m_startTime;
|
|
MxBool m_isRunning;
|
|
static MxLong s_LastTimeCalculated;
|
|
static MxLong s_LastTimeTimerStarted;
|
|
};
|
|
|
|
#endif // MXTIMER_H
|