[sysprof/wip/visualizers] capture: use SpClock for current timestamp
- From: Christian Hergert <chergert src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [sysprof/wip/visualizers] capture: use SpClock for current timestamp
 
- Date: Sun,  9 Oct 2016 03:31:33 +0000 (UTC)
 
commit 34f493d553f37f07d3c29f74dc13d7f3aac5051e
Author: Christian Hergert <chergert redhat com>
Date:   Sat Oct 8 20:29:16 2016 -0700
    capture: use SpClock for current timestamp
    
    It is important that our capture current time matches the
    same clock we are using for events. Otherwise we could have
    drift between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW.
 lib/sp-capture-types.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/sp-capture-types.h b/lib/sp-capture-types.h
index 94ed1ec..84178be 100644
--- a/lib/sp-capture-types.h
+++ b/lib/sp-capture-types.h
@@ -25,6 +25,8 @@
 # include <glib-object.h>
 #endif
 
+#include "sp-clock.h"
+
 G_BEGIN_DECLS
 
 #define SP_CAPTURE_MAGIC (GUINT32_TO_LE(0xFDCA975E))
@@ -38,7 +40,7 @@ G_BEGIN_DECLS
 # define SP_CAPTURE_ADDRESS_FORMAT "0x%016llx"
 #endif
 
-#define SP_CAPTURE_CURRENT_TIME   (g_get_monotonic_time() * 1000L)
+#define SP_CAPTURE_CURRENT_TIME   (sp_clock_get_current_time())
 #define SP_CAPTURE_COUNTER_INT64  0
 #define SP_CAPTURE_COUNTER_DOUBLE 1
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]