Navigation
API > API/Runtime > API/Runtime/EventLoop > API/Runtime/EventLoop/TTimerManager
Description
Set a new timer. The timer callback will be triggered from within the call to Tick, which may occur on a different thread from the one which set the timer.
Thread safe.
| Name | SetTimer |
| Type | function |
| Header File | /Engine/Source/Runtime/Online/Experimental/EventLoop/Public/EventLoop/EventLoopTimer.h |
| Include Path | #include "EventLoop/EventLoopTimer.h" |
FTimerHandle SetTimer
(
FTimerCallback && Callback,
FTimespan InRate,
bool InbRepeat,
TOptional< FTimespan > InFirstDelay
)
handle to the registered timer.
Parameters
| Name | Remarks |
|---|---|
| Callback | Callback to call when timer fires. |
| InRate | The amount of time between set and firing. |
| InbRepeat | true to keep firing at Rate intervals, false to fire only once. |
| InFirstDelay | The time for the first iteration of a looping timer. |