MCPcopy Create free account
hub / github.com/crownengine/crown / html5_spin_until

Method html5_spin_until

src/device/save_game.cpp:441–446  ·  view source on GitHub ↗

Spins until @a pred returns true or exit is requested. Returns true if the predicate was satisfied, false if exit was requested.

Source from the content-addressed store, hash-verified

439 /// Spins until @a pred returns true or exit is requested.
440 /// Returns true if the predicate was satisfied, false if exit was requested.
441 bool html5_spin_until(bool (*pred)())
442 {
443 while (!_exit.load() && !pred())
444 os::sleep(1);
445 return !_exit.load();
446 }
447#endif
448
449 ///

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.50
loadMethod · 0.45

Tested by

no test coverage detected