MCPcopy Create free account
hub / github.com/diasurgical/devilution / nthread_has_500ms_passed

Function nthread_has_500ms_passed

Source/nthread.cpp:219–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219BOOL nthread_has_500ms_passed(BOOL unused)
220{
221 DWORD currentTickCount;
222 int ticksElapsed;
223
224 currentTickCount = SDL_GetTicks();
225 ticksElapsed = currentTickCount - last_tick;
226 if (gbMaxPlayers == 1 && ticksElapsed > 500) {
227 last_tick = currentTickCount;
228 ticksElapsed = 0;
229 }
230 return ticksElapsed >= 0;
231}
232
233DEVILUTION_END_NAMESPACE

Callers 3

msg_wait_for_turnsFunction · 0.85
run_game_loopFunction · 0.85
game_loopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected