summaryrefslogtreecommitdiff
path: root/gdk/gdkframeclockidle.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-02-12 10:44:17 +0100
committerAlexander Larsson <alexl@redhat.com>2020-02-12 10:44:17 +0100
commitcc643df88b541b7505885ecff02c8576decf6bbd (patch)
tree9ad50d1837c511674bbd84557194c78b4b392a0e /gdk/gdkframeclockidle.c
parent13eedf1a9ff75e7b587842389afce6d3e5651a9b (diff)
downloadgtk+-cc643df88b541b7505885ecff02c8576decf6bbd.tar.gz
Convert all profiler times from nsec to usec
usec is the scale of the monotonic timer which is where we get almost all the times from. The only actual source of nsec is the opengl GPU time (but who knows what the actual resulution of that is). Changing this to usec allows us to get rid of " * 1000" in a *lot* of places all over the codebase, which are ugly and confusing.
Diffstat (limited to 'gdk/gdkframeclockidle.c')
-rw-r--r--gdk/gdkframeclockidle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index 29cd57975f..b350924ce2 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -502,7 +502,7 @@ gdk_frame_clock_paint_idle (void *data)
priv->sleep_serial = get_sleep_serial ();
if (gdk_profiler_is_running ())
- gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "frameclock", "paint_idle");
+ gdk_profiler_add_mark (before, (g_get_monotonic_time () - before), "frameclock", "paint_idle");
return FALSE;
}
@@ -599,8 +599,8 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
if (priv->freeze_time != 0)
{
gint64 thaw_time = g_get_monotonic_time ();
- gdk_profiler_add_mark (priv->freeze_time * 1000,
- (thaw_time - priv->freeze_time) * 1000,
+ gdk_profiler_add_mark (priv->freeze_time,
+ (thaw_time - priv->freeze_time),
"frameclock freeze", "");
priv->freeze_time = 0;
}