Is it ok to apply physics on timer timeout?

Godot Version

v4.2.2

Question

As the title said, I am wondering if it is a good approach to apply physic (i.e call ApplyImpulse) directly when a timer got timeout. Or should I set a flag on timer timeout and check that flag on _PhysicsProcess and run ApplyImpulse if the flag is true?

so someting like this:

private void Timeout() {
     ApplyImpulse(x, y, z);
}

or this?

public override void _PhysicsProcess(double delta) {
    if (triggered) {
        ApplyImpulse(x, y, z);
        triggered = false;
    }
}

private void Timeout() {
    triggered = true;
}

I tried both, and I can’t find any differences :thinking:
Personally, I prefer doing it directly on timeout, if possible. Since it is simpler and more straight-forward…but I am not sure whether it is ok to apply it outside of physics process…

Thanks in advance!!

I believe the logic behind the impulse is calculated on physics_process anyway so it shouldnt matter when you call it