| 186 | } |
| 187 | |
| 188 | std::string Statistics::SecondsToTimeString(double seconds) { |
| 189 | double secs = fmod(seconds, 60); |
| 190 | int minutes = (seconds / 60); |
| 191 | int hours = (seconds / 3600); |
| 192 | minutes = minutes - (hours * 60); |
| 193 | |
| 194 | char buffer[256]; |
| 195 | snprintf(buffer, |
| 196 | sizeof(buffer), |
| 197 | #ifdef SM_TIMING_SHOW_HOURS |
| 198 | "%02d:" |
| 199 | #endif |
| 200 | #ifdef SM_TIMING_SHOW_MINUTES |
| 201 | "%02d:" |
| 202 | #endif |
| 203 | "%09.6f", |
| 204 | #ifdef SM_TIMING_SHOW_HOURS |
| 205 | hours, |
| 206 | #endif |
| 207 | #ifdef SM_TIMING_SHOW_MINUTES |
| 208 | minutes, |
| 209 | #endif |
| 210 | secs); |
| 211 | return buffer; |
| 212 | } |
| 213 | |
| 214 | void Statistics::Print(std::ostream& out) { // NOLINT |
| 215 | const map_t& tag_map = Instance().tag_map_; |
nothing calls this directly
no outgoing calls
no test coverage detected