mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-05 17:57:14 +02:00
tststs
This commit is contained in:
parent
6443bc3b77
commit
0e5c1e7254
1 changed files with 1 additions and 4 deletions
|
|
@ -233,11 +233,8 @@ bool Event::WaitFor(const std::chrono::nanoseconds time) {
|
||||||
bool Event::WaitFor(const std::chrono::nanoseconds time) {
|
bool Event::WaitFor(const std::chrono::nanoseconds time) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
auto const end = Common::g_wall_clock.GetTimeNS() + time;
|
auto const end = Common::g_wall_clock.GetTimeNS() + time;
|
||||||
while (!is_set.load() && rem > 0) {
|
while (!is_set.load() && end > Common::g_wall_clock.GetTimeNS())
|
||||||
Common::Windows::SleepForOneTick();
|
Common::Windows::SleepForOneTick();
|
||||||
if (Common::g_wall_clock.GetTimeNS() > end)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (is_set.load())
|
if (is_set.load())
|
||||||
Reset();
|
Reset();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue