Allegro Version 4.9.2 (SVN) Time Timer routines |
Timer routinesSummary
conversion macrosal_install_timer
Install a new timer. If successful, a pointer to a new timer object is returned, otherwise NULL is returned. speed_secs is in seconds per “tick”, and must be positive. The new timer is initially stopped. The system driver must be installed before this function can be called. Usage note: typical granularity is on the order of microseconds, but with some drivers might only be milliseconds. al_set_timer_speed
Set the timer’s speed, i.e. the rate at which its counter will be incremented when it is started. This can be done when the timer is started or stopped. If the timer is currently running, it is made to look as though the speed change occured precisely at the last tick. speed_secs has exactly the same meaning as with al_install_timer. |
Install a new timer.
AL_FUNC( ALLEGRO_TIMER*, al_install_timer, (double speed_secs) )
Uninstall the timer specified.
AL_FUNC( void, al_uninstall_timer, (ALLEGRO_TIMER *timer) )
Start the timer specified.
AL_FUNC( void, al_start_timer, (ALLEGRO_TIMER *timer) )
Stop the timer specified.
AL_FUNC( void, al_stop_timer, (ALLEGRO_TIMER *timer) )
Return true if the timer specified is currently started.
AL_FUNC( bool, al_timer_is_started, (ALLEGRO_TIMER *timer) )
Return the timer’s speed, in seconds.
AL_FUNC( double, al_get_timer_speed, (ALLEGRO_TIMER *timer) )
Set the timer’s speed, i.e.
AL_FUNC( void, al_set_timer_speed, (ALLEGRO_TIMER *timer, double speed_secs) )
Return the timer’s counter value.
AL_FUNC( long, al_get_timer_count, (ALLEGRO_TIMER *timer) )
Change a timer’s counter value.
AL_FUNC( void, al_set_timer_count, (ALLEGRO_TIMER *timer, long count) )