This is not the right way to create a new node instance. Timer() creates an instance on the stack which I believe is not really supported by Godot objects. Then you call _new() which is a static function. Static function don’t require an instance to be called so the constructor call before is unnecessary.
Usually in C++ we use new Timer() to create a new instance on the heap, however the Godot C++ bindings use _new() instead for reasons I don’t remember:
Timer *timer = Timer::_new();
Then, about yielding:
std::this_thread::yield();
yield is something specific to GDScript. It is not directly supported in C++. std::this_thread::yield() does something very different which is not what Godot yields do.
If you want to execute code when the timer emits the timeout signal, you can’t do it in the same function, you have to make another one which you will use as signal handler: