Call set timer of a function inside that same function, is it possible?

This is just a test to see how timers work in c++, since we can not use the delay function from KismetSystemLibrary.
What i want is to be able to call a timer of that function inside of it.
Am i able to do that?
If yes, how?

Thanks everybody!

You can create or remove a timer from within the function that is being called by the timer. It just needs to have the proper callback signature. One thing to note is that it’s better to use a recurring function than manually performing that by adding your function each call

And wich signature is the right one?
Can you give a example?

Thanks for the tip.

void MyTimer()
{
// Do something on a timer
}

Do i need to have two functions, to make the timer work, or can i make a timer that call the fuction that sets the timer?

**MyTManager->SetTimer**(THandle, FTimerDelegate::CreateUObject(&AtesteInput::testTimer, inputStructer), 2.0f, false);

And from that comment:
“It just needs to have the proper callback signature.”
I thought that i was using the wrong callback signature, from that function mention above. Thats why i´ve ask you the example.

I dont get why this is giving me this error, now im doing it with two functions…

The first argument to FDelegate::CreateUObject() is the UObject instance to call the timer on.