| 35 | } |
| 36 | |
| 37 | UString 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 | |
| 51 | UString GameTime::getShortTimeString() const |
| 52 | { |
no test coverage detected