al_create_timer
ALLEGRO_TIMER* al_create_timer(double speed_secs)
Introduced in 5.0.0
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.
See also: al_start_timer, al_destroy_timer
Examples: ex_bitmap, ex_bitmap_flip, ex_blend, ex_blit, ex_clip, ex_display_options, ex_draw, ex_draw_bitmap, ex_expose, ex_filter, ex_gldepth, ex_glext, ex_haiku, ex_icon, ex_iphone, ex_logo, ex_multisample, ex_native_filechooser, ex_noframe, ex_ogre3d, ex_premulalpha, ex_prim, ex_resize, ex_stream_seek, ex_threads, ex_threads2, ex_timer, ex_transform, ex_ttf, ex_user_events
Most helpful discussions:
- How to create multiple timers? (1)
- al_wait_for_event won't catch the timer. (1)
- Rest Vs a better form
- linking on ubuntu
- Using Sine And Cosine For Rotation
- Shooting Ball From Rotating Bitmap
- Problem with al_creat_bitmap
- A5 : timer issue
- Using very short allegro timers in separate thread and getting lots of cpu usage
- Mouse Click Inside Timer Function
Other recent discussions:
- A5 Fullscreen Vs Windowed
- Convert *bitmap to char buffer
- al_load_bitmap question
- MOUSE question
- Mouse Activity Question
- Having Trouble with exit(1) - Stalling Program
- My second game, space invader simplified
- Vivace extra points. Its there a better way of doing this one.
- I'm new
- Key-presses speed-up program