formatStatusLineDuration function
Compactly renders a duration for time_spent: 21:03 under an hour,
1:02:03 and beyond otherwise (omp's compact clock form).
Implementation
String formatStatusLineDuration(Duration d) {
final h = d.inHours;
final m = d.inMinutes % 60;
final s = d.inSeconds % 60;
String two(int v) => v.toString().padLeft(2, '0');
return h > 0 ? '$h:${two(m)}:${two(s)}' : '${two(m)}:${two(s)}';
}