0 votes

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

Godot version 3.4.stable
in Engine by (158 points)

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

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.