Initial Commit

This commit is contained in:
2024-08-07 09:09:36 -04:00
commit ca445435a0
458 changed files with 41370 additions and 0 deletions

46
common/TIMER.HPP Normal file
View File

@@ -0,0 +1,46 @@
#ifndef _COMMON_TIMER_HPP_
#define _COMMON_TIMER_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
class Timer
{
public:
Timer(void);
virtual ~Timer(void);
void startTimer(LONG milliSeconds);
WORD hasExpired(void);
private:
long mStartTime;
long mStopTime;
WORD mHasExpired;
};
inline
Timer::Timer()
: mHasExpired(FALSE)
{
}
inline
Timer::~Timer()
{
}
inline
void Timer::startTimer(LONG milliSeconds)
{
mStartTime=::GetTickCount();
mStopTime=mStartTime+milliSeconds;
}
inline
WORD Timer::hasExpired(void)
{
if (mStopTime<mStartTime)
return TRUE;
mStartTime+=::GetTickCount()-mStartTime;
return FALSE;
}
#endif