Re: [AD] use double for al_current_time and al_rest?

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


HAPPY NEW YEARS EVERYONE ;)

>That's horrible for multithreaded programs, unless the counter is
>thread-local.  Even then, it's horrible as soon as you have two time
>intervals to track within the one OS thread.  In any case, we use
>al_current_time() for the time stamp in events.  We need a global
>reference for that.

I agree here.  You could always do something like this:

typedef al_counter unsigned long;
typedef al_counter_d double;
al_counter al_get_count(al_counter *counter)
{
   al_counter ret = *counter;
   *counter = 0;
   return ret;
}

/* counter is a pointer to an Allegro counter that will incremented by the master counter at a rate of al_counter_resolution... Or something */
int al_start counter(al_counter *counter)

any ways   ;)   it could work... Just an idea though


Never miss a thing. Make Yahoo your homepage.

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