use the Time singleton instead of OS singleton #26

Merged
cromer merged 1 commits from feature/time_singleton into develop 2022-08-05 13:55:28 -04:00

View File

@ -85,7 +85,7 @@ func _ready() -> void:
game["screen_size"] = screen_size game["screen_size"] = screen_size
game["game_version"] = game_version game["game_version"] = game_version
game["won"] = false game["won"] = false
game["timestamp"] = OS.get_unix_time() game["timestamp"] = int(Time.get_unix_time_from_system())
game["frames"] = frames game["frames"] = frames
var err = $HTTPRequest.connect("request_completed", self, "_on_request_completed") var err = $HTTPRequest.connect("request_completed", self, "_on_request_completed")
@ -107,7 +107,7 @@ func _physics_process(_delta: float) -> void:
frame["coins"] = coins frame["coins"] = coins
frame["points"] = points frame["points"] = points
frame["fps"] = Engine.get_frames_per_second() 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() var frame_objects = objects.duplicate()
frame["objects"] = frame_objects frame["objects"] = frame_objects
@ -151,8 +151,8 @@ func start_monitor() -> void:
frames.clear() frames.clear()
game["level_id"] = 2 # PrototypeR game["level_id"] = 2 # PrototypeR
game["won"] = false game["won"] = false
game["timestamp"] = OS.get_unix_time() game["timestamp"] = int(Time.get_unix_time_from_system())
start_time = OS.get_ticks_msec() start_time = Time.get_ticks_msec()
started = true started = true