[UI] - less impact to limiting frames
This commit is contained in:
parent
d6a650a4f9
commit
2772d8a7f5
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue