golddotasksquestions on reddid suggested for "trigger something exactly at a specific OS-time, down to a specific second":
var alarm_has_not_triggered = true
func _process(delta):
var time = OS.get_time()
var time_string = str(str(time.hour).pad_zeros(2),":",str(time.minute).pad_zeros(2),":",str(time.second).pad_zeros(2))
if time_string == "17:15:30" and alarm_has_not_triggered:
print("The Time Is Now")
alarm_has_not_triggered = false
print(time_string)
and for "trigger something repeatedly every second, in sync with OS-time-second":
var last_second = OS.get_time().second
func _process(delta):
var time = OS.get_time()
if time.second != last_second:
print("start of a new second")
last_second = time.second
print(time.second)
which work like a charm.
(I added some "returns" not to have the time printed on each frame.)