From code:
var _timer = null
func _ready():
_timer = Timer.new()
add_child(_timer)
_timer.connect("timeout", self, "_on_Timer_timeout")
_timer.set_wait_time(1.0)
_timer.set_one_shot(false) # Make sure it loops
_timer.start()
func _on_Timer_timeout():
print("Second!")
You can also do it all from the editor: create Timer child, set same properties, then open the Node tab, and connect the timeout
signal to _on_Timer_timeout
.