Countdown timer?

Okay, I have the code for a countdown timer, I get how that works. My only problem is how would I have it countdown in a time format. So that, say I have 2 minutes, it’ll go from 2:00 to 1:59, 1:58 and so on.

The code I’m using is C# so any code posted would be preferable in C#

Thanks :wink:

I dont know C# so this is all pseudo code, it should be pretty easy:

Have your total amount of time be in seconds. Make sure your values are all ints, as this will all be integer division for ease of use with remainders.

minutesDisplay = seconds / 60

secondsDisplay = seconds - (minutesDisplay*60)

then print to a guiLabel (minutesdisplay + “:” + secondsDisplay)

you will need some conditional formatting for displaying a zero in front of the digit when the secondsDisplay number is less than 10