From: <cod...@gm...> - 2012-03-22 14:20:23
|
Hello Michael, in the attachment you'll find a short conf. I hope the curse driver (more simple to config) is ok for you. You'll notice that the displayed number (cnt) will increase in steps of 2 each second (not 1 as expected) because the timer expression is evaluated twice in one timer run. Causes of the problem: The loop in line 367 of 'timer_group.c'. At first the timer widget is added as one-shot timer to the 'TimerGroupWidgets' field (timer_group.c) via 'timer_add_widget' (timer_group.c) called by 'widget_timer_update' called by 'widget_timer_init' (both in 'widget_timer.c'). Ignoring other timers the TimerGroupWidgets will contain: 0: Timer_Cnt active If 'timer_process_group' (timer_group.c) is called it will call 'widget_timer_update' (widget_timer.c) for 0 via callback _in the loop_. 'widget_timer_update' calls 'timer_add_widget' (timer_group.c) which adds a new Timer_Cnt to a new place in TimerGroupWidgets cause the old Timer_Cnt is still active. It'll be set inactive (cause one-shot) in the loop _after_ 'widget_timer_update' already finished. After that we got... 0: Timer_Cnt inactive 1: Timer_Cnt active ... and the loop continues to process the next active Timer_cnt (1), which leads to... 0: Timer_Cnt active 1: Timer_Cnt inactive => For now on Timer_Cnt is contained twice TimerGroupWidgets and will processed twice. First 0 that activates 1 for the same run, which activateds 0 for the next run and so on. Solution: My patch exchanges the timer elements (for the same widget) so the active element will be on the already processed position in TimerGroupWidgets. So it won't be processed again in the same run. (I hope to not create unwished side effects.) Regards Marcus -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a |