mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 23:20:54 +00:00
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:
@ -110,7 +110,7 @@ update_label_text (PangoLayout *layout,
|
|||||||
time %= NSEC_PER_SEC;
|
time %= NSEC_PER_SEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (want_msec || (!hours && !min && !sec))
|
if (want_msec || (!hours && !min && !sec && msec))
|
||||||
{
|
{
|
||||||
if (hours > 0)
|
if (hours > 0)
|
||||||
str = g_strdup_printf ("%02u:%02u:%02u.%04u", hours, min, sec, msec);
|
str = g_strdup_printf ("%02u:%02u:%02u.%04u", hours, min, sec, msec);
|
||||||
|
|||||||
Reference in New Issue
Block a user