# Time routines

These functions are declared in the main Allegro header file:

~~~~c
 #include <allegro5/allegro.h>
~~~~

## API: ALLEGRO_TIMEOUT

Represent a timeout value.  The size of the structure is known so can be
statically allocated.  The contents are private.

See also: [al_init_timeout]

## API: al_get_time

Return the number of seconds since the Allegro library was
initialised. The return value is undefined if Allegro is uninitialised.
The resolution depends on the used driver, but typically can be in the
order of microseconds.

## API: al_current_time

Alternate spelling of [al_get_time].

## API: al_init_timeout

Set timeout value of some number of seconds after the function call.

See also: [ALLEGRO_TIMEOUT], [al_wait_for_event_until]

## API: al_rest

Waits for the specified number seconds. This tells the system to pause
the current thread for the given amount of time. With some operating
systems, the accuracy can be in the order of 10ms. That is, even

~~~~c
al_rest(0.000001)
~~~~

might pause for something like 10ms. Also see the section <Timer routines>
on easier ways to time your program without using up all CPU.

