libsysprof-gtk: fix usec/msec groupings

This commit is contained in:
Christian Hergert
2023-06-14 17:29:18 -07:00
parent fb1a1b40ee
commit c8ac9fe984

View File

@ -166,9 +166,9 @@ sysprof_time_label_set_internal (SysprofTimeLabel *self,
if (t == 0)
str[0] = 0;
else if (t < SYSPROF_NSEC_PER_SEC/1000)
else if (t < 1000000)
g_snprintf (str, sizeof str, "%.3lfμs", t/1000.);
else if (t < SYSPROF_NSEC_PER_SEC/1000000)
else if (t < SYSPROF_NSEC_PER_SEC)
g_snprintf (str, sizeof str, "%.3lfms", t/1000000.);
else
g_snprintf (str, sizeof str, "%.3lfs", t/(double)SYSPROF_NSEC_PER_SEC);