FTimerHandle or FTimerDelegate

I’m trying to understand when delegates should be used with timers and when it isn’t necessary. Are there any hard and fast rules about this (or links to good explanations online)?

FTimerHandle is how you control the timer, you can pause it, stop it, get current elapsed time etc.
FTimerDelegate is the method that the timer calls each interval.

FTimerHandle handle;
GetWorldTimerManager().SetTimer(handle, this, &ATestActor::DoStuff, 1.f, false);

handle is the FTimerHandle and DoStuff is the delegate function to call.

1 Like