mirror of
https://github.com/holub/mame
synced 2025-06-08 13:53:52 +03:00
29 lines
309 B
C++
29 lines
309 B
C++
#ifndef UNITTEST_TIMEHELPERS_H
|
|
#define UNITTEST_TIMEHELPERS_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
namespace UnitTest {
|
|
|
|
class Timer
|
|
{
|
|
public:
|
|
Timer();
|
|
void Start();
|
|
double GetTimeInMs() const;
|
|
|
|
private:
|
|
struct timeval m_startTime;
|
|
};
|
|
|
|
|
|
namespace TimeHelpers
|
|
{
|
|
void SleepMs(int ms);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
#endif
|