---
name: "al_create_timer"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_create_timer"
---

# al\_create\_timer(3)

Allegro 5 API

## NAME

al\_create\_timer - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_TIMER *al_create_timer(double speed_secs)
  ```

## DESCRIPTION

Allocates and initializes a 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 and needs to be started with [al\_start\_timer(3)](/al_start_timer/3.md) before ALLEGRO\_EVENT\_TIMER(3) events are sent.

Usage note: typical granularity is on the order of microseconds, but with some drivers might only be milliseconds.

## SEE ALSO

[al\_start\_timer(3)](/al_start_timer/3.md), [al\_destroy\_timer(3)](/al_destroy_timer/3.md)
