Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MikeMikeMike |
Hi…,
I want to sync some tool nodes, therefore I would need the current time passed in the editor.
How to get the total passed editor time in GDscript?
Thanks
Mike
os.get_datetime()
https://forum.godotengine.org/3282/how-to-get-current-system-time
ramazan | 2022-03-19 11:02
hi @ramazan,
this was a good hint, I am trying this code now:
var time_start_msec : int = 0
var time_current_msec : int = 0
func _ready():
time_start_msec = OS.get_ticks_msec()
func _process( _delta ):
time_current_msec = OS.get_ticks_msec() - time_start_msec
Thanks again
Mike
MikeMikeMike | 2022-03-19 14:08