MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / ticksToPosix

Function ticksToPosix

game/state/gametime.cpp:23–28  ·  view source on GitHub ↗

FIXME: Refactor to always use ptime instead of ticks?

Source from the content-addressed store, hash-verified

21
22// FIXME: Refactor to always use ptime instead of ticks?
23static time_duration ticksToPosix(int64_t ticks)
24{
25 int64_t tickTotal = std::round(static_cast<double>(ticks * time_duration::ticks_per_second()) /
26 TICKS_PER_SECOND);
27 return time_duration(0, 0, 0, tickTotal);
28}
29
30GameTime::GameTime(uint64_t ticks) : ticks(ticks){};
31

Callers 1

getPtimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected