PDA

View Full Version : CL_Timer in ClanLib 0.9



rombust
01-07-2009, 06:03 PM
At the moment, CL_Timer is broken in 0.9.

If you do not call CL_Timer::stop(), before the destructor, nasty things will happen.

This is because the display window expects to control CL_Timer, and does not know when it is destroyed.

(This is why the Scrollbar test is broken)

I propose, the following solution:

At the moment, we have CL_Timer -> CL_Timer_Impl

To change it to CL_Timer -> CL_Timer_Impl -> [CL_TimerProvider] -> CL_TimerProvider_Standard

This may work!

:confused:

rombust
01-08-2009, 10:35 AM
I have changed CL_Timer as follows:

CL_Timer -> CL_Timer_Impl -> CL_TimerProvider (interface)

CL_TimerProvider_X11 and CL_TimerProvider_Win32 are used as the interface.

The display window provider set_timer() and kill_timer() has been changed to use the CL_TimerProvider as a parameter (Instead of CL_Timer)