Flecs: Timer
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Typedefs | Functions
Timer
C++ API » Addons

Run systems at a time interval. More...

Collaboration diagram for Timer:

## Typedefs
using | flecs::Timer = EcsTimer
using | flecs::RateFilter = EcsRateFilter

## Functions
template<typename T>
flecs::timer | flecs::world::timer () const
| Find or register a singleton timer.
void | flecs::system::interval (ecs_ftime_t interval)
| Set interval.
ecs_ftime_t | interval ()
| Get interval.
void | timeout (ecs_ftime_t timeout)
| Set timeout.
ecs_ftime_t | timeout ()
| Get timeout.
void | rate (int32_t rate)
| Set system rate (system is its own tick source).
void | start ()
| Start timer.
void | stop ()
| Stop timer.
template<typename T>
void | set_tick_source ()
| Set external tick source.
void | set_tick_source (flecs::entity e)
| Set external tick source.

## Detailed Description

Run systems at a time interval.

## Typedef Documentation

## ◆ RateFilter

using flecs::RateFilter = EcsRateFilter

Definition at line 19 of file decl.hpp.

## ◆ Timer

using flecs::Timer = EcsTimer

Definition at line 18 of file decl.hpp.

## Function Documentation

## ◆ interval() [1/2]

ecs_ftime_t flecs::system::interval | ( |  | ) |
| related

Get interval.

See also
  ecs_get_interval.

Definition at line 64 of file impl.hpp.

## ◆ interval() [2/2]

void flecs::system::interval | ( | ecs_ftime_t | interval | ) |
| inline

Set interval.

See also
  ecs_set_interval

Definition at line 60 of file impl.hpp.

## ◆ rate()

void flecs::system::rate | ( | int32_t | rate | ) |
| related

Set system rate (system is its own tick source).

See also
  ecs_set_rate

Definition at line 76 of file impl.hpp.

## ◆ set_tick_source() [1/2]

template<typename T>

void flecs::system::set_tick_source | ( |  | ) |
| related

Set external tick source.

See also
  ecs_set_tick_source

Definition at line 89 of file impl.hpp.

## ◆ set_tick_source() [2/2]

void flecs::system::set_tick_source | ( | flecs::entity | e | ) |
| related

Set external tick source.

See also
  ecs_set_tick_source

Definition at line 93 of file impl.hpp.

## ◆ start()

void flecs::system::start | ( |  | ) |
| related

Start timer.

See also
  ecs_start_timer

Definition at line 80 of file impl.hpp.

## ◆ stop()

void flecs::system::stop | ( |  | ) |
| related

Stop timer.

See also
  ecs_start_timer

Definition at line 84 of file impl.hpp.

## ◆ timeout() [1/2]

ecs_ftime_t flecs::system::timeout | ( |  | ) |
| related

Get timeout.

See also
  ecs_get_timeout

Definition at line 72 of file impl.hpp.

## ◆ timeout() [2/2]

void flecs::system::timeout | ( | ecs_ftime_t | timeout | ) |
| related

Set timeout.

See also
  ecs_set_timeout

Definition at line 68 of file impl.hpp.

## ◆ timer()

template<typename T>

flecs::timer flecs::world::timer | ( |  | ) | const
| inline

Find or register a singleton timer.

Definition at line 47 of file impl.hpp.