mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 10:37:00 +00:00
Remove unecessary files and made the tree much more cleaner. Signed-off-by: Ronald Caesar <github43132@proton.me>
45 lines
896 B
C++
45 lines
896 B
C++
// Copyright 2025 Xenon Emulator Project. All rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include <chrono>
|
|
#include "Types.h"
|
|
|
|
namespace Base
|
|
{
|
|
|
|
enum class ThreadPriority : u32
|
|
{
|
|
Low = 0,
|
|
Normal = 1,
|
|
High = 2,
|
|
VeryHigh = 3,
|
|
Critical = 4
|
|
};
|
|
|
|
void SetCurrentThreadRealtime(std::chrono::nanoseconds period_ns);
|
|
|
|
void SetCurrentThreadPriority(ThreadPriority new_priority);
|
|
|
|
void SetCurrentThreadName(const std::string_view& name);
|
|
|
|
void SetThreadName(void* thread, const std::string_view& name);
|
|
|
|
class AccurateTimer
|
|
{
|
|
std::chrono::nanoseconds target_interval{};
|
|
std::chrono::nanoseconds total_wait{};
|
|
|
|
std::chrono::high_resolution_clock::time_point start_time;
|
|
|
|
public:
|
|
explicit AccurateTimer(std::chrono::nanoseconds target_interval);
|
|
|
|
void Start();
|
|
|
|
void End();
|
|
|
|
std::chrono::nanoseconds GetTotalWait() const { return total_wait; }
|
|
};
|
|
|
|
} // namespace Base
|