On Tue, 2010-08-10 at 16:59 +0800, golfish wrote: > Thank you for your quickly reply. > On 2010-08-10 16:49, Emmanuele Bassi writed: > > On Tue, 2010-08-10 at 16:39 +0800, golfish wrote: > >> clutter 1.2.6 > >> > >> I modified test-behave.c in clutter source code directory. > >> 1. set fps of timeline to 400 > > > > how can you do this, since FPS have been removed since Clutter 1.0? > clutter_timeline_new (400)
this is not the frames per second count: it's the duration, in milliseconds, of the timeline. if your screen is refreshing at 60Hz you should have 60 frames per second; this means that the timeline will have a duration of 400 / 16 = 25 frames. > >> 2. add sleep(1) in button_press_cb() > > > > you're blocking the main loop. do *not* ever call sleep() in a main > > loop-based toolkit. > I use sleep() for simulation. For example, reading a large file... don't do blocking operations in the main loop. sleep(), I/O, a tight for() loop - they are all blocking operations. don't do them. if you're doing I/O I suggest you either use GIO or a thread. > If the error is occurred because I block the main loop. But how to > explain the animation looks fine if I delete the process of > clutter_timeline_set_direction. just randomness. the animation is taking less than half a second - you can see fluctuations in your OS actually blocking for 1 second. ciao, Emmanuele. -- Emmanuele Bassi, Open Source Software Engineer Intel Open Source Technology Center _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
