Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Timer

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

Definition at line 19 of file decl.hpp.

◆ Timer

Definition at line 18 of file decl.hpp.

Function Documentation

◆ interval() [1/2]

ecs_ftime_t interval ( )
related

Get interval.

See also
ecs_get_interval.

◆ interval() [2/2]

void interval ( ecs_ftime_t interval)

Set interval.

See also
ecs_set_interval

◆ rate()

void rate ( int32_t rate)
related

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

See also
ecs_set_rate

◆ set_tick_source() [1/2]

template<typename T >
void set_tick_source ( )
related

Set external tick source.

See also
ecs_set_tick_source

◆ set_tick_source() [2/2]

void set_tick_source ( flecs::entity e)
related

Set external tick source.

See also
ecs_set_tick_source

◆ start()

void start ( )
related

Start timer.

See also
ecs_start_timer

◆ stop()

void stop ( )
related

Stop timer.

See also
ecs_start_timer

◆ timeout() [1/2]

ecs_ftime_t timeout ( )
related

Get timeout.

See also
ecs_get_timeout

◆ timeout() [2/2]

void timeout ( ecs_ftime_t timeout)
related

Set timeout.

See also
ecs_set_timeout