You can use Timersfor this sort of behavior, although you’d have to do some management to get it to repeat 5 times and then stop.
Or, you can keep track of elapsed time using some combination of UWorld::GetTimeSeconds, FApp::GetCurrentTime, and FApp::GetDeltaTime and fire the function manually in some tick function