From 0f85d5cfa3aa24ee5ba0ade934a5b709ba476711 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Fri, 5 Aug 2022 13:23:45 -0400 Subject: [PATCH] use the Time singleton instead of OS singleton time functions in OS are being deprecated and will be removed in gotod 4.0 --- godot/monitor/Monitor.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/godot/monitor/Monitor.gd b/godot/monitor/Monitor.gd index e146477..db4232a 100644 --- a/godot/monitor/Monitor.gd +++ b/godot/monitor/Monitor.gd @@ -85,7 +85,7 @@ func _ready() -> void: game["screen_size"] = screen_size game["game_version"] = game_version game["won"] = false - game["timestamp"] = OS.get_unix_time() + game["timestamp"] = int(Time.get_unix_time_from_system()) game["frames"] = frames var err = $HTTPRequest.connect("request_completed", self, "_on_request_completed") @@ -107,7 +107,7 @@ func _physics_process(_delta: float) -> void: frame["coins"] = coins frame["points"] = points frame["fps"] = Engine.get_frames_per_second() - frame["elapsed_time"] = OS.get_ticks_msec() - start_time + frame["elapsed_time"] = Time.get_ticks_msec() - start_time var frame_objects = objects.duplicate() frame["objects"] = frame_objects @@ -151,8 +151,8 @@ func start_monitor() -> void: frames.clear() game["level_id"] = 2 # PrototypeR game["won"] = false - game["timestamp"] = OS.get_unix_time() - start_time = OS.get_ticks_msec() + game["timestamp"] = int(Time.get_unix_time_from_system()) + start_time = Time.get_ticks_msec() started = true