|
Search
|
These functions are declared in the main Allegro header file: ALLEGRO_TIMERThis is an abstract data type representing a timer object. ALLEGRO_USECS_TO_SECSConvert microseconds to seconds. ALLEGRO_MSECS_TO_SECSConvert milliseconds to seconds. al_install_timerInstall 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. See also: al_start_timer, al_uninstall_timer al_start_timerStart the timer specified. From then, the timer's counter will increment at a constant rate, and it will begin generating events. Starting a timer that is already started does nothing. See also: al_stop_timer, al_timer_is_started al_stop_timerStop the timer specified. The timer's counter will stop incrementing and it will stop generating events. Stopping a timer that is already stopped does nothing. See also: al_start_timer, al_timer_is_started al_timer_is_startedReturn true if the timer specified is currently started. al_uninstall_timerUninstall the timer specified. If the timer is started, it will automatically be stopped before uninstallation. It will also automatically unregister the timer with any event queues. Does nothing if passed the NULL pointer. See also: al_install_timer al_get_timer_countReturn the timer's counter value. The timer can be started or stopped. See also: al_set_timer_count al_set_timer_countChange a timer's counter value. The timer can be started or stopped. The count value may be positive or negative, but will always be incremented by +1. See also: al_get_timer_count al_get_timer_speedReturn the timer's speed, in seconds. See also: al_set_timer_speed al_set_timer_speedSet 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. See also: al_get_timer_speed al_get_timer_event_sourceRetrieve the associated event source. |
Last updated: 2010-05-26 10:53:32 UTC