Remove YBaseLib dependency
This commit is contained in:
29
src/common/timer.h
Normal file
29
src/common/timer.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace Common {
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
using Value = u64;
|
||||
|
||||
Timer();
|
||||
|
||||
static Value GetValue();
|
||||
static double ConvertValueToSeconds(Value value);
|
||||
static double ConvertValueToMilliseconds(Value value);
|
||||
static double ConvertValueToNanoseconds(Value value);
|
||||
|
||||
void Reset();
|
||||
|
||||
double GetTimeSeconds() const;
|
||||
double GetTimeMilliseconds() const;
|
||||
double GetTimeNanoseconds() const;
|
||||
|
||||
private:
|
||||
Value m_tvStartValue;
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
Reference in New Issue
Block a user