[gtk+/gtk-style-context: 430/490] GtkTimeline: Adapt to monotonic time.



commit 09fea3deefe87ea40efd8dd97e7f720c7e1f20e3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Nov 22 03:23:18 2010 +0100

    GtkTimeline: Adapt to monotonic time.

 gtk/gtktimeline.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktimeline.c b/gtk/gtktimeline.c
index 348011c..09b78c5 100644
--- a/gtk/gtktimeline.c
+++ b/gtk/gtktimeline.c
@@ -311,16 +311,16 @@ gtk_timeline_run_frame (GtkTimeline *timeline)
 {
   GtkTimelinePriv *priv;
   gdouble delta_progress, progress;
-  guint elapsed_time;
+  gdouble elapsed_time;
 
   priv = timeline->priv;
 
-  elapsed_time = (guint) (g_timer_elapsed (priv->timer, NULL) * 1000);
+  elapsed_time = g_timer_elapsed (priv->timer, NULL) * 1000 * 1000;
   g_timer_start (priv->timer);
 
   if (priv->animations_enabled)
     {
-      delta_progress = (gdouble) elapsed_time / priv->duration;
+      delta_progress = elapsed_time / priv->duration;
       progress = priv->last_progress;
 
       if (priv->direction == GTK_TIMELINE_DIRECTION_BACKWARD)



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