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

Method getLongTimeString

game/state/gametime.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37UString GameTime::getLongTimeString() const
38{
39 std::stringstream ss;
40 if (TIME_LONG_FORMAT == nullptr)
41 {
42 // locale controls the facet
43 time_facet *timeFacet = new time_facet("%H:%M:%S");
44 TIME_LONG_FORMAT = new std::locale(std::locale::classic(), timeFacet);
45 }
46 ss.imbue(*TIME_LONG_FORMAT);
47 ss << getPtime(this->ticks);
48 return ss.str();
49}
50
51UString GameTime::getShortTimeString() const
52{

Callers 4

beginMethod · 0.80
createMessageRowMethod · 0.80
updateMethod · 0.80
updateMethod · 0.80

Calls 1

getPtimeFunction · 0.85

Tested by

no test coverage detected