From f0d4260c81886c32aecd001bd1e6cb6268836dad Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 5 Jun 2014 15:08:29 -0400 Subject: [PATCH] ShellPerfLog: Use monotonic timestamps for logging Use g_get_monotonic_time() (that is, CLOCK_MONOTONIC) timestamps, rather than gettimeofday() values. https://bugzilla.gnome.org/show_bug.cgi?id=732350 --- src/shell-perf-log.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shell-perf-log.c b/src/shell-perf-log.c index 6c1f293ce..ab78deddc 100644 --- a/src/shell-perf-log.c +++ b/src/shell-perf-log.c @@ -126,11 +126,7 @@ G_DEFINE_TYPE(ShellPerfLog, shell_perf_log, G_TYPE_OBJECT); static gint64 get_time (void) { - GTimeVal timeval; - - g_get_current_time (&timeval); - - return timeval.tv_sec * G_GINT64_CONSTANT(1000000) + timeval.tv_usec; + return g_get_monotonic_time (); } static void