visualizer-ticks: don't render 00:00:00.0000

If we are at the beginning of a capture, we would end up drawing
the msec because h/m/s were all zero. Make sure we also have a
non-zero msec or just fallback to regular timestamps.
This commit is contained in:
Christian Hergert
2016-09-30 17:07:33 -07:00
parent 5c53dd5d6e
commit 76b92cec99

View File

@ -110,7 +110,7 @@ update_label_text (PangoLayout *layout,
time %= NSEC_PER_SEC;
}
if (want_msec || (!hours && !min && !sec))
if (want_msec || (!hours && !min && !sec && msec))
{
if (hours > 0)
str = g_strdup_printf ("%02u:%02u:%02u.%04u", hours, min, sec, msec);