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
This commit is contained in:
Owen W. Taylor 2014-06-05 15:08:29 -04:00
parent a7f82745c6
commit f0d4260c81

View File

@ -126,11 +126,7 @@ G_DEFINE_TYPE(ShellPerfLog, shell_perf_log, G_TYPE_OBJECT);
static gint64 static gint64
get_time (void) get_time (void)
{ {
GTimeVal timeval; return g_get_monotonic_time ();
g_get_current_time (&timeval);
return timeval.tv_sec * G_GINT64_CONSTANT(1000000) + timeval.tv_usec;
} }
static void static void