mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-27 08:37:07 +02:00
Convert CPU caps into a global instead of MT safe global
This commit is contained in:
parent
f40da0638b
commit
98232563e9
9 changed files with 31 additions and 35 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue