mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-21 02:45:00 +00:00
dummy timer class
This commit is contained in:
parent
79a6464c58
commit
20c0960cc6
3 changed files with 77 additions and 1 deletions
34
src/Lib/Timer.h
Normal file
34
src/Lib/Timer.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include "../Types.h"
|
||||
|
||||
namespace Lib {
|
||||
class Timer final
|
||||
{
|
||||
public:
|
||||
Timer();
|
||||
~Timer() = default;
|
||||
|
||||
void Start();
|
||||
void Pause();
|
||||
void Resume();
|
||||
bool IsPaused() const;
|
||||
|
||||
double GetTimeMsec() const;// return time in milliseconds
|
||||
double GetTimeSec() const;// return time in seconds
|
||||
u64 GetTicks() const;// return time in ticks
|
||||
u64 GetFrequency() const;// return ticks frequency
|
||||
|
||||
public:
|
||||
Timer(const Timer&) = delete;
|
||||
Timer& operator=(const Timer&) = delete;
|
||||
Timer(Timer&&) = delete;
|
||||
Timer& operator=(Timer&&) = delete;
|
||||
|
||||
private:
|
||||
bool m_is_timer_paused = true;
|
||||
u64 m_Frequency = 0;
|
||||
u64 m_StartTime = 0;
|
||||
u64 m_PauseTime = 0;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue