MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / sleep

Method sleep

modules/core/core/src/async/service_thread.cpp:198–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void AsyncService::sleep() SKR_NOEXCEPT
199{
200 const auto ms = skr_atomicu32_load_relaxed(&sleep_time);
201 SkrZoneScopedNC("asyncService(Cond)", tracy::Color::Gray55);
202
203 condlock.lock();
204 if (!event)
205 {
206 condlock.wait(ms);
207 }
208 event = false;
209 condlock.unlock();
210}
211
212} // namespace skr

Callers

nothing calls this directly

Calls 4

lockMethod · 0.45
waitMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected