Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FTimerManager > API/Runtime/Engine/FTimerManager/SetTimer
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/TimerManager.h |
| Include | #include "TimerManager.h" |
template<class UserClass>
void SetTimer
&40;
FTimerHandle & InOutHandle,
UserClass &42; InObj,
typename FTimerDelegate::TMethodPtr< UserClass > InTimerMethod,
float InRate,
bool InbLoop,
float InFirstDelay
&41;
Remarks
Sets a timer to call the given native function at a set interval. If a timer is already set for this handle, it will replace the current timer.
Parameters
| Name | Description |
|---|---|
| InOutHandle | If the passed-in handle refers to an existing timer, it will be cleared before the new timer is added. A new handle to the new timer is returned in either case. |
| InObj | Object to call the timer function on. |
| InTimerMethod | Method to call when timer fires. |
| InRate | The amount of time (in seconds) between set and firing. If <= 0.f, clears existing timers. |
| InbLoop | true to keep firing at Rate intervals, false to fire only once. |
| InFirstDelay | The time (in seconds) for the first iteration of a looping timer. If < 0.f InRate will be used. |