Re: [AD] Timer patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Feb 2, 2008 7:48 AM, Elias Pschernig <elias@xxxxxxxxxx> wrote:
On Thu, 2008-01-31 at 11:37 -0800, Ryan Dickie wrote:
> I've cleaned up the patches as requested.
>
> I have no real opinion as to whether al_current_time() should return
> seconds since 1970 or seconds since allegro started. The current
> method returns the same value on all platforms which may or may not be
> useful. I suppose it might be nice to remove a chunk of code. I do
> think that al_current_time() is a long method name and that al_time()
> "read: allegro time" might be easier on the fingers.
>

I applied both patches unmodified now.

--
Elias Pschernig <elias@xxxxxxxxxx>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers


Yay :-D

I struggled a bit tonight but i got the new 2.6.24 kernel compiled with the tickless scheduling. It is damned accurate (no more periodic os interupt). Calling al_rest 1000 times for 1 ms sleeps gave the following results.

1000x 1ms delays
Time Slept 1.065
Cummulative error 0.064732
Error per sleep 0.000065

The error in the periodic timer. This is just the error of the timer thread itself. The event wakeup itself should add some error as well. I'm too tired to code that up just now ;)
Error:-0.000012
Percentage: 0.012000 (100 * -error / delay time )

The error with the old ticking kernel is about 1.5ms (sometimes peaked as high as 2.5). This is now a factor of 10x more accurate than the windows ones which themselves are only 200us off.


-- Ryan Dickie


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/