| 103 | } |
| 104 | |
| 105 | std::string Utility::formatTimeShort(double seconds) { |
| 106 | |
| 107 | int h((int) seconds / 3600); |
| 108 | int min((int) seconds / 60 - h * 60); |
| 109 | int sec((int) seconds - (h * 60 + min) * 60); |
| 110 | |
| 111 | std::ostringstream oss; |
| 112 | if (h > 0) { |
| 113 | oss << std::setfill('0') << std::setw(2) << h << ":"; |
| 114 | } |
| 115 | if (min > 0) { |
| 116 | oss << std::setfill('0') << std::setw(2) << min << ":"; |
| 117 | } |
| 118 | oss << std::setfill('0') << std::setw(2) << sec; |
| 119 | |
| 120 | return oss.str(); |
| 121 | } |
| 122 | |
| 123 | static std::string convertToString(double num) { |
| 124 | std::ostringstream convert; |
nothing calls this directly
no outgoing calls
no test coverage detected