use - for unknown duration
This commit is contained in:
parent
19dd3b13e2
commit
6bdf5d7e5c
1 changed files with 4 additions and 0 deletions
|
@ -135,6 +135,10 @@ class Ui.Window : Adw.ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
[GtkCallback] private string format_timestamp (int64 ns) {
|
[GtkCallback] private string format_timestamp (int64 ns) {
|
||||||
|
if (ns == 1) {
|
||||||
|
// treat 1 nanosecond as a sentinel value
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
int64 ms = ns / 1000000;
|
int64 ms = ns / 1000000;
|
||||||
int s = (int) (ms / 1000);
|
int s = (int) (ms / 1000);
|
||||||
return "%02d:%02d".printf (s/60, s%60);
|
return "%02d:%02d".printf (s/60, s%60);
|
||||||
|
|
Loading…
Reference in a new issue