From cc643df88b541b7505885ecff02c8576decf6bbd Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 12 Feb 2020 10:44:17 +0100 Subject: 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. --- gtk/gtkicontheme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gtk/gtkicontheme.c') diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index aec4b78b4a..398f5558de 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1847,7 +1847,7 @@ ensure_valid_themes (GtkIconTheme *self, load_themes (self); if (gdk_profiler_is_running ()) - gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "icon theme load", self->current_theme); + gdk_profiler_add_mark (before, (g_get_monotonic_time () - before), "icon theme load", self->current_theme); if (was_valid) queue_theme_changed (self); @@ -3606,7 +3606,8 @@ icon_ensure_texture__locked (GtkIconPaintable *icon, g_assert (icon->texture != NULL); if (gdk_profiler_is_running ()) - gdk_profiler_add_markf (before * 1000, (g_get_monotonic_time () - before) * 1000, in_thread ? "icon load (thread)" : "icon load" , "%s size %d@%d", icon->filename, icon->desired_size, icon->desired_scale); + gdk_profiler_add_markf (before, g_get_monotonic_time () - before, in_thread ? "icon load (thread)" : "icon load" , + "%s size %d@%d", icon->filename, icon->desired_size, icon->desired_scale); } static GdkTexture * -- cgit v1.2.1