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)
- Cannot exit fullscreen with ALLEGRO_OPENGL flag
- Redrawing smoothly while display is being resized
- Blacking out the display while resizing
- KrampusHack 2016
- Bitmap behind mappy map
- Statically link Allegro 5 in Ubuntu?
- Why some Shaders don't work !
- Change adapter un runtime
Other recent discussions:
- Complications when drawing FPS
- Mixing Allegro 5 with OPENGL
- upgrading tank war codebase to allegro 5
- Keyboard input while rendering?
- Advice for game loops with lengthy computations
- Font loading crashing with Allegro 5.2
- Inconstistent joystick event delay
- Dsound undefined reference error when compiling using 5.2.1 binaries
- Display stops updating if I change the backbuffer-- What am I doing wrong?
- al_dtor_list is NULL, crash in al_create_timer