FTSTicker

Thread-safe ticker class. Fires delegates after a delay.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Core

Header

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

Include

#include "Containers/Ticker.h"

Syntax

class FTSTicker

Remarks

Thread-safe ticker class. Fires delegates after a delay.

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.

Can be called concurrently.

Public function Static

FTSTicker &

 

GetCoreTicker()

Singleton used for the ticker in Core / Launch.

Public function Static

void

 

RemoveTicker

(
    FDelegateHandle Handle
)

Removes a previously added ticker delegate.

Public function

void

 

Reset()

Resets the instance to its default state. Must be called from the ticking thread.

Public function

void

 

Tick

(
    float DeltaTime
)

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

Typedefs

Name

Description

FDelegateHandle

FElementPtr