[sysprof/wip/visualizers] visualizer-ticks: don't render 00:00:00.0000



commit 76b92cec999d7c133b60bf7ed0a89478fe058094
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 30 17:07:33 2016 -0700

    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.

 lib/sp-visualizer-ticks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/sp-visualizer-ticks.c b/lib/sp-visualizer-ticks.c
index 9d637c1..c736dcd 100644
--- a/lib/sp-visualizer-ticks.c
+++ b/lib/sp-visualizer-ticks.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]