FTicker

Ticker class.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Ticker.h

Include

#include "Containers/Ticker.h"

Syntax

class FTicker

Remarks

Ticker class. Fires delegates after a delay.

Note: Do not try to add the same delegate instance twice, as there is no way to remove only a single instance (see member RemoveTicker).

Variables

Name Description

Protected variable

bool

 

bCurrentElementRemoved

State to track whether the CurrentElement removed itself during its own delegate execution.

Protected variable

bool

 

bInTick

State to track whether CurrentElement is valid.

Protected variable

FElement

 

CurrentElement

Current element being ticked (only valid during tick).

Protected variable

double

 

CurrentTime

Current time of the ticker

Protected variable

TArray< FElemen...

 

Elements

Future delegates to fire

Protected variable

TArray< FElemen...

 

TickedElements

List of delegates that have been considered during Tick.

Constructors

Name Description

Public function

FTicker()

Destructors

Name Description

Public function

~FTicker()

Functions

Name Description

Public function

FDelegateHan...

 

AddTicker

(
    const FTickerDelegate& InDelegate,
    float InDelay
)

Add a new ticker with a given delay / interval

Public function

FDelegateHan...

 

AddTicker

(
    const TCHAR* InName,
    float InDelay,
    TFunction< bool> Function
)

Add a new ticker with a given delay / interval.

Public function Static

FTicker &

 

GetCoreTicker()

Singleton used for the ticker in Core / Launch.

Public function

void

 

RemoveTicker

(
    FDelegateHandle Handle
)

Removes a previously added ticker delegate.

Public function Static

void

 

TearDownCoreTicker()

Public function

void

 

Tick

(
    float DeltaTime
)

Fire all tickers who have passed their delay and reschedule the ones that return true

Classes

Name

Description

Protected struct

FElement

Element of the priority queue

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss