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.
AM2R-TimeTrials/scripts/steps_to_time2.gml

18 lines
515 B

/// steps_to_time2(steps)
// Converts a number of steps into "hh:mm:ss" format.
sec = floor(argument0 / 60);
minute = floor(sec / 60);
hour = floor(minute / 60);
sec2 = sec - minute * 60;
minute2 = minute - hour * 60;
if (minute2 < 10) {
minstr = "0" + string(minute2);
} else minstr = string(minute2);
if (sec2 < 10) {
secstr = "0" + string(sec2);
} else secstr = string(sec2);
if (hour < 10) {
hourstr = "0" + string(hour);
} else hourstr = string(hour);
return hourstr + ":" + minstr + ":" + secstr;