In games with time limits, how do you convert seconds to microwave time?

In games with time limits, how do you convert seconds to microwave time?
Let's say you have 60 seconds that would be 00:60 but if you have 61 seconds it's 1:01.

How do you explain this?

By not introducing time limits, because they suck.

...

What did they mean by this

Can you repeat the question?

thats some weird bait OP

...

Old copypasta is old

Games with time limits are cancer and I don't play them.

All time limits are set assuming you're an average player.
If you can't beat a timelimit in a game, you're a filthy casual, worse than the majority of Reddit.

Hello Dead Rising 4 team, still upset your game sucks?

You got 99 problems but 39 ain't 1.

Name at least one game with time limit that requires any sort of skill.

None. They are all that piss easy, yet you are still so shit at video games that you won't play a game with a time limit.

you don't because some autist would write a time class/library (depending on what meme language most likely library) and does the formatting of unix meme time for you

It's military time not unix time you sperg.

Is this a programming question?
Is this a lack of understanding a non base 10?

pretty sure it formats unix time

trunc(seconds/60) : (seconds%60)
Because having 60 seconds represented as 00:60 rather than 01:00 is stupid

racing games

Also here's my shitter code in Lua for doing this.
print("Enter time in seconds to convert to military time.")i = io.read()i = tonumber(i)if i >= 3600 then hours = math.floor(i / 3600) i = (i - (hours * 3600))endif i >= 60 then minutes = math.floor(i / 60) i = (i - (minutes * 60)) seconds = iendprint(hours..":"..minutes..":"..seconds)

Actually that breaks if the time is less than an hour:
print("Enter time in seconds to convert to military time.")i = io.read()i = tonumber(i)if i >= 3600 then hours = math.floor(i / 3600) i = (i - (hours * 3600))else hours = 0endif i >= 60 then minutes = math.floor(i / 60) i = (i - (minutes * 60))else minutes = 0endseconds = iprint(hours..":"..minutes..":"..seconds)

That truly is shitter code, you weren't joking.


print("Enter time in seconds to convert to military time.")
i = io.read()
i = tonumber(i)

minutes = 3600 % 60
hours = minutes % 60
seconds = i - (minutes * 60)
minutes -= hours * 60

print(hours..":"..minutes..":"..seconds)

Don't know how to do the code quote

pls no bully

Made at typo… first line should be

minutes = i % 60

Modulus gives the remainder you dummy.

the sticky post on /tg/ should help you out

I stand corrected, made a stupid mistake. The correct code is:


minutes = math.floor(i/60)
hours = math.floor(minutes/60)
minutes -= hours * 60
seconds = i - (minutes * 60) - (hours * 3600)

Although the approach with the modulus can also work:

hours = math.floor(i / 3600)
i %= 3600
minutes = math.floor(i / 60)
seconds = i % 60