Game created during The Indie Tales Jam https://pinkduck-oleksiy.itch.io/chores-with-cranberry
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
404 B

extends Label
var time_start = 0
var time_now = 0
var stop = 0
func _ready():
time_start = OS.get_unix_time()
set_process(true)
func _process(_delta):
if (stop == 0):
time_now = OS.get_unix_time()
var elapsed = time_now - time_start
var minutes = elapsed / 60
var seconds = elapsed % 60
var str_elapsed = "%02d:%02d" % [minutes, seconds]
text = str_elapsed
func stoptimer():
stop = 1