Convert CPU caps into a global instead of MT safe global

This commit is contained in:
lizzie 2026-05-23 21:08:24 +00:00
parent f40da0638b
commit 98232563e9
9 changed files with 31 additions and 35 deletions

View file

@ -35,10 +35,10 @@ public:
is_set = false;
}
bool WaitFor(const std::chrono::nanoseconds& time);
bool WaitFor(const std::chrono::nanoseconds time);
template<class Clock, class Duration>
bool WaitUntil(const std::chrono::time_point<Clock, Duration>& time) {
bool WaitUntil(const std::chrono::time_point<Clock, Duration> time) {
std::unique_lock lk{mutex};
if (!condvar.wait_until(lk, time, [this] { return is_set.load(); }))
return false;