isle/LEGO1/mxtimer.h

34 lines
531 B
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef MXTIMER_H
#define MXTIMER_H
#include "mxcore.h"
// VTABLE 0x100dc0e0
// SIZE 0x10
class MxTimer : public MxCore
2023-04-27 22:19:39 -04:00
{
public:
MxTimer();
void Start();
void Stop();
2023-04-27 22:19:39 -04:00
__declspec(dllexport) long GetRealTime();
inline long GetTime()
{
if (this->m_isRunning)
return s_LastTimeCalculated;
else
return s_LastTimeCalculated - this->m_startTime;
}
private:
long m_startTime;
MxBool m_isRunning;
static long s_LastTimeCalculated;
static long s_LastTimeTimerStarted;
2023-04-27 22:19:39 -04:00
};
#endif // MXTIMER_H