* clutter/clutter-timeline.c: (clutter_timeline_set_duration):
authorØyvind Kolås <pippin@openedhand.com>
Thu, 18 Oct 2007 13:47:21 +0000 (13:47 +0000)
committerØyvind Kolås <pippin@openedhand.com>
Thu, 18 Oct 2007 13:47:21 +0000 (13:47 +0000)
rearranged arithemetic to allow specifying duration with sub second
precision (also enables durations smaller than one second).

ChangeLog
clutter/clutter-timeline.c

index 31fbcf4..9306dfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-18  Øyvind Kolås  <pippin@o-hand.com>
+
+       * clutter/clutter-timeline.c: (clutter_timeline_set_duration):
+       rearranged arithemetic to allow specifying duration with sub second
+       precision (also enables durations smaller than one second).
+
 2007-10-18  Emmanuele Bassi  <ebassi@openedhand.com>
 
        * clutter/clutter-script-private.h:
index 51a25d2..9fc6a16 100644 (file)
@@ -1044,8 +1044,7 @@ clutter_timeline_set_duration (ClutterTimeline *timeline,
 
       priv->duration = msecs;
 
-      priv->n_frames = priv->duration / 1000
-                       * priv->fps;
+      priv->n_frames = priv->duration * priv->fps / 1000;
 
       g_object_notify (G_OBJECT (timeline), "num-frames");
       g_object_notify (G_OBJECT (timeline), "duration");