Navigation
Unreal Engine C++ API Reference > Runtime > Engine > FTimerManager > SetTimer
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Public/TimerManager.h |
Include | #include "TimerManager.h" |
template<class UserClass>
void SetTimer
(
FTimerHandle & InOutHandle,
UserClass * InObj,
typename FTimerDelegate::TMethodPtr< UserClass > InTimerMethod,
float InRate,
const FTimerManagerTimerParameters & InTimerParameters
)
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. |
InTimerParameters | The structure with additional timer looping and delay parameters. |