func _ready():
var time_then = OS.get_unix_time()
$Timer.start(2)
yield($Timer, "timeout")
print(OS.get_unix_time() - time_then)
This prints 2 and there will be a delay
However, there is no delay here:
func _ready():
var time_then = OS.get_unix_time()
add_delay(2)
print(OS.get_unix_time() - time_then)
func add_delay(duration):
$Timer.start(duration)
yield($Timer, "timeout")
This prints 0 and there is no delay