MCPcopy Create free account
hub / github.com/DFHack/dfhack / GetTimeMs64

Function GetTimeMs64

library/MiscUtils.cpp:473–484  ·  view source on GitHub ↗

Linux

Source from the content-addressed store, hash-verified

471
472#ifdef LINUX_BUILD // Linux
473uint64_t GetTimeMs64()
474{
475 struct timeval tv;
476 gettimeofday(&tv, NULL);
477 uint64_t ret = tv.tv_usec;
478
479 // Convert from micro seconds (10^-6) to milliseconds (10^-3)
480 ret /= 1000;
481 // Adds the seconds (10^0) after converting them to milliseconds (10^-3)
482 ret += (tv.tv_sec * 1000);
483 return ret;
484}
485
486
487#else // Windows

Callers 3

ktimerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected