diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-02-12 10:44:17 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-12 10:44:17 +0100 |
commit | cc643df88b541b7505885ecff02c8576decf6bbd (patch) | |
tree | 9ad50d1837c511674bbd84557194c78b4b392a0e /gtk/gtkapplication.c | |
parent | 13eedf1a9ff75e7b587842389afce6d3e5651a9b (diff) | |
download | gtk+-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 'gtk/gtkapplication.c')
-rw-r--r-- | gtk/gtkapplication.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index a60feee9e5..6885c4e44f 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -307,7 +307,7 @@ gtk_application_startup (GApplication *g_application) before2 = g_get_monotonic_time (); gtk_init (); if (gdk_profiler_is_running ()) - gdk_profiler_add_mark (before2 * 1000, (g_get_monotonic_time () - before2) * 1000, "gtk init", NULL); + gdk_profiler_add_mark (before2, (g_get_monotonic_time () - before2), "gtk init", NULL); priv->impl = gtk_application_impl_new (application, gdk_display_get_default ()); gtk_application_impl_startup (priv->impl, priv->register_session); @@ -315,7 +315,7 @@ gtk_application_startup (GApplication *g_application) gtk_application_load_resources (application); if (gdk_profiler_is_running ()) - gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "gtk application startup", NULL); + gdk_profiler_add_mark (before, (g_get_monotonic_time () - before), "gtk application startup", NULL); } static void |