Common/Timer: Add additional sleep functions
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace Common {
|
||||
@ -7,7 +6,7 @@ namespace Common {
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
using Value = u64;
|
||||
using Value = std::uint64_t;
|
||||
|
||||
Timer();
|
||||
|
||||
@ -15,6 +14,12 @@ public:
|
||||
static double ConvertValueToSeconds(Value value);
|
||||
static double ConvertValueToMilliseconds(Value value);
|
||||
static double ConvertValueToNanoseconds(Value value);
|
||||
static Value ConvertSecondsToValue(double s);
|
||||
static Value ConvertMillisecondsToValue(double s);
|
||||
static Value ConvertNanosecondsToValue(double ns);
|
||||
static void BusyWait(std::uint64_t ns);
|
||||
static void HybridSleep(std::uint64_t ns, std::uint64_t min_sleep_time = UINT64_C(2000000));
|
||||
static void NanoSleep(std::uint64_t ns);
|
||||
|
||||
void Reset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user