- if (ss->finished && !ss->canceled) {
- printf(" and finished after %llu seconds\n",
- ss->duration);
- } else if (ss->canceled) {
- printf(" and was aborted after %llu seconds\n",
- ss->duration);
- } else {
- printf(", running for %llu seconds\n", ss->duration);
- }
+
+ seconds = ss->duration;
+ hours = ss->duration / (60 * 60);
+ gmtime_r(&seconds, &tm);
+ strftime(t, sizeof(t), "%M:%S", &tm);
+ if (ss->in_progress)
+ printf(", running for %02u:%s\n", hours, t);
+ else if (ss->canceled)
+ printf(" and was aborted after %02u:%s\n", hours, t);
+ else if (ss->finished)
+ printf(" and finished after %02u:%s\n", hours, t);
+ else
+ printf(", interrupted after %02u:%s, not running\n",
+ hours, t);