MCPcopy Create free account
hub / github.com/defold/defold / WaitForFlag

Function WaitForFlag

engine/dlib/src/test/test_mdns.cpp:276–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274 }
275
276 static bool WaitForFlag(int32_atomic_t* flag, uint32_t iterations, uint32_t sleep_us)
277 {
278 for (uint32_t i = 0; i < iterations; ++i)
279 {
280 if (dmAtomicGet32(flag))
281 return true;
282 dmTime::Sleep(sleep_us);
283 }
284 return false;
285 }
286
287 static void MakeUniqueName(char* buffer, size_t buffer_size, const char* prefix, uint64_t nonce)
288 {

Callers 1

TESTFunction · 0.85

Calls 2

dmAtomicGet32Function · 0.85
SleepFunction · 0.50

Tested by

no test coverage detected