Fix millisecond formatting

soundtrack
Ensar Sarajčić 2021-11-18 20:07:30 +01:00
parent 00ae651966
commit 0adeb40d0b
1 changed files with 1 additions and 1 deletions

View File

@ -24,5 +24,5 @@ func _on_lap_complete(lap_time: float) -> void:
func _format_time(time: float) -> String:
var minute = floor(time / 1000.0 / 60.0)
var second = floor((time / 1000.0) - minute * 60)
var millisecond = time - minute * 60 - second * 1000
var millisecond = time - minute * 60 * 1000 - second * 1000
return "%02d:%02d.%03d" % [minute, second, millisecond]