mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Common: Create a PrecisionTimer class.
This commit is contained in:
@ -5,6 +5,10 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class Timer
|
||||
@ -32,4 +36,21 @@ private:
|
||||
bool m_running{false};
|
||||
};
|
||||
|
||||
class PrecisionTimer
|
||||
{
|
||||
public:
|
||||
PrecisionTimer();
|
||||
~PrecisionTimer();
|
||||
|
||||
PrecisionTimer(const PrecisionTimer&) = delete;
|
||||
PrecisionTimer& operator=(const PrecisionTimer&) = delete;
|
||||
|
||||
void SleepUntil(Clock::time_point);
|
||||
|
||||
private:
|
||||
#ifdef _WIN32
|
||||
HANDLE m_timer_handle;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // Namespace Common
|
||||
|
Reference in New Issue
Block a user