isle/LEGO1/mxtimer.h
Christian Semmler 7ded9d0263 More fixes
2023-12-12 11:45:37 -05:00

33 lines
529 B
C++

#ifndef MXTIMER_H
#define MXTIMER_H
#include "mxcore.h"
// VTABLE: LEGO1 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 g_lastTimeTimerStarted;
else
return g_lastTimeCalculated - this->m_startTime;
}
private:
MxLong m_startTime;
MxBool m_isRunning;
static MxLong g_lastTimeCalculated;
static MxLong g_lastTimeTimerStarted;
};
#endif // MXTIMER_H