From 8b2df7ced9e0be99cc9bc56678ad12ba614d75de Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 15 Nov 2011 15:34:51 +0000 Subject: [PATCH] Remove the GTimer used by clutter_get_timestamp() Use g_get_monotonic_time() instead, which does the right thing. --- clutter/clutter-main.c | 21 ++------------------- clutter/clutter-private.h | 3 --- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index ca4663319..bc7f36969 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -1393,11 +1393,6 @@ clutter_context_get_default_unlocked (void) ctx->settings = clutter_settings_get_default (); _clutter_settings_set_backend (ctx->settings, ctx->backend); -#ifdef CLUTTER_ENABLE_DEBUG - ctx->timer = g_timer_new (); - g_timer_start (ctx->timer); -#endif - ctx->motion_events_per_actor = TRUE; ctx->last_repaint_id = 1; } @@ -1431,21 +1426,9 @@ gulong clutter_get_timestamp (void) { #ifdef CLUTTER_ENABLE_DEBUG - ClutterMainContext *ctx; - gdouble seconds; - - _clutter_context_lock (); - - ctx = clutter_context_get_default_unlocked (); - - /* FIXME: may need a custom timer for embedded setups */ - seconds = g_timer_elapsed (ctx->timer, NULL); - - _clutter_context_unlock (); - - return (gulong)(seconds / 1.0e-6); + return (gulong) g_get_monotonic_time (); #else - return 0; + return 0L; #endif } diff --git a/clutter/clutter-private.h b/clutter/clutter-private.h index 30ea65fa3..1740c699f 100644 --- a/clutter/clutter-private.h +++ b/clutter/clutter-private.h @@ -134,9 +134,6 @@ struct _ClutterMainContext /* the main event queue */ GQueue *events_queue; - /* timer used to print the FPS count */ - GTimer *timer; - ClutterPickMode pick_mode; /* mapping between reused integer ids and actors */