mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-29 11:06:05 -05:00
889fd886f0
* Add MxSemphore + MxThread and the two implementations I could find of MxThread (consumers extend it and override the Run method). * Implement a function in MxDiskStreamProvider which uses thread and semaphore to confirm correct layout / size of those classes. * All 100% match except two functions with a pair of registers swapped.
33 lines
543 B
C++
33 lines
543 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_LastTimeTimerStarted;
|
|
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
|