MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / slowTick

Function slowTick

src/Engine/Timer.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30const Uint32 accurate = 4;
31Uint32 slowTick()
32{
33 static Uint32 old_time = SDL_GetTicks();
34 static Uint64 false_time = static_cast<Uint64>(old_time) << accurate;
35 Uint64 new_time = ((Uint64)SDL_GetTicks()) << accurate;
36 false_time += (new_time - old_time) / Timer::gameSlowSpeed;
37 old_time = new_time;
38 return false_time >> accurate;
39}
40
41}//namespace
42

Callers 3

startMethod · 0.85
getTimeMethod · 0.85
thinkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected