| 195 | } |
| 196 | |
| 197 | void formatTime(char *str, int seconds) { |
| 198 | int h = seconds / (60*60); |
| 199 | seconds -= h*60*60; |
| 200 | int m = seconds / 60; |
| 201 | seconds -= m*60; |
| 202 | if (h > 0) |
| 203 | { |
| 204 | sprintf(str, "%dh:%02dm:%02ds", h, m, seconds); |
| 205 | } |
| 206 | else |
| 207 | { |
| 208 | sprintf(str, "%02dm:%02ds", m, seconds); |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | void log_battery_state(const EmscriptenBatteryEvent *e) { |
| 213 | char t1[64]; |
no test coverage detected