From 6bdf5d7e5cfe1c0d2138fdd4cfe5f71c3644235f Mon Sep 17 00:00:00 2001 From: Erica Z Date: Wed, 16 Oct 2024 13:07:14 +0200 Subject: [PATCH] use - for unknown duration --- src/ui/window.vala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/window.vala b/src/ui/window.vala index 4681694..b8763e8 100644 --- a/src/ui/window.vala +++ b/src/ui/window.vala @@ -135,6 +135,10 @@ class Ui.Window : Adw.ApplicationWindow { } [GtkCallback] private string format_timestamp (int64 ns) { + if (ns == 1) { + // treat 1 nanosecond as a sentinel value + return "-"; + } int64 ms = ns / 1000000; int s = (int) (ms / 1000); return "%02d:%02d".printf (s/60, s%60);