gnome-games r8473 - trunk/libgames-support



Author: chpe
Date: Tue Jan  6 18:19:45 2009
New Revision: 8473
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8473&view=rev

Log:
Add profiling to games_runtime_init().

Modified:
   trunk/libgames-support/games-runtime.c

Modified: trunk/libgames-support/games-runtime.c
==============================================================================
--- trunk/libgames-support/games-runtime.c	(original)
+++ trunk/libgames-support/games-runtime.c	Tue Jan  6 18:19:45 2009
@@ -31,6 +31,7 @@
 #include <glib/gi18n.h>
 
 #include "games-debug.h"
+#include "games-profile.h"
 #include "games-runtime.h"
 
 static char *app_name;
@@ -83,6 +84,8 @@
 gboolean
 games_runtime_init (const char *name)
 {
+  gboolean retval;
+
   setlocale (LC_ALL, "");
 
 #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS) || defined(HAVE_GSTREAMER)
@@ -93,6 +96,8 @@
   /* May call any glib function after this point */
 #endif
 
+  _games_profile_start ("games_runtime_init");
+
   _games_debug_init ();
 
   app_name = g_strdup (name);
@@ -110,11 +115,15 @@
   _games_debug_print (GAMES_DEBUG_RUNTIME,
                       "Relocation path: %s\n", path ? path : "(null)");
 
-  return path != NULL;
+  retval = path != NULL;
 }
 #else
-  return TRUE;
+  retval = TRUE;
 #endif
+
+  _games_profile_end ("games_runtime_init");
+
+  return retval;
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]