[UI] - less impact to limiting frames

This commit is contained in:
Cancerous 2020-01-27 19:31:22 -05:00 committed by illusion98
parent d6a650a4f9
commit 2772d8a7f5
2 changed files with 1 additions and 4 deletions

View File

@ -839,8 +839,6 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingBuffer* reader,
swap_update_time_ns_ = xe::Clock::QueryHostSystemTime();
} else {
xe::threading::MaybeYield();
xe::threading::Sleep(std::chrono::nanoseconds((swap_update_time_ns_ +
16666) - xe::Clock::QueryHostSystemTime()));
}
}
return true;

View File

@ -187,8 +187,7 @@ void Window::OnPaint(UIEvent* e) {
if (now_ns > fps_update_time_ns_ + 16666) {
// do nothing
} else {
xe::threading::Sleep(std::chrono::nanoseconds((fps_update_time_ns_ +
16666) - now_ns));
xe::threading::MaybeYield();
}
}