- Main Page
- Modules
- Data Structures
- Files
- Directories
- Related Pages

# Software timer
[Time]

## Typedefs
typedef struct gavl_timer_s | gavl_timer_t
| Opaque timer structure.
## Functions
gavl_timer_t * | gavl_timer_create ()
| Create a timer.
void | gavl_timer_destroy (gavl_timer_t *timer)
| Destroy a timer.
void | gavl_timer_start (gavl_timer_t *timer)
| Start a timer.
void | gavl_timer_stop (gavl_timer_t *timer)
| Stop a timer.
gavl_time_t | gavl_timer_get (gavl_timer_t *timer)
| Get the current time of the timer.
void | gavl_timer_set (gavl_timer_t *timer, gavl_time_t t)
| Set the current time of the timer.

## Detailed Description

This is a simple software timer, which can be used for synchronization purposes for cases wherer there is no synchronization with hardware devices available.

## Typedef Documentation

typedef struct gavl_timer_s gavl_timer_t

Opaque timer structure.

You don't want to know what's inside.

## Function Documentation

gavl_timer_t* gavl_timer_create | ( |  | ) |

Create a timer.

Returns:
  A newly allocated timer

void gavl_timer_destroy | ( | gavl_timer_t * | timer | ) |

Destroy a timer.

Parameters:

  | timer | A timer

Destroys a timer and frees all associated memory

void gavl_timer_start | ( | gavl_timer_t * | timer | ) |

Start a timer.

Parameters:

  | timer | A timer

void gavl_timer_stop | ( | gavl_timer_t * | timer | ) |

Stop a timer.

Parameters:

  | timer | A timer

gavl_time_t gavl_timer_get | ( | gavl_timer_t * | timer | ) |

Get the current time of the timer.

Parameters:

  | timer | A timer

Returns:
  Current time

void gavl_timer_set | ( | gavl_timer_t * | timer,
|  | gavl_time_t | t |
| ) |  |  |

Set the current time of the timer.

Parameters:

  | timer | A timer
  | t | New time