Time syntax question

mont7181

Lifetimer
Joined
Jul 16, 2005
Messages
210
Reaction score
1
Points
16
Location
CT
When I run a macro in an instance I like the macro to show how long I've been playing, so I know approx. how much time I have left until the instance ends.
Hours and seconds works fine. But I cant get minutes to show 0 -59, minutes just keeps increasing.

${Int[${Math.Calc[${Macro.RunTime}/3600]}]} Hour(s)

${Int[${Math.Calc[${Macro.RunTime}-${Int[${Math.Calc[${Macro.RunTime}/60]}]}*60]}]} Sec.

What is the code for minutes to show 0-59?
Thank you
 
Here is part of one of my macros that calculates time. Think I wrote this when I must of been smarter, as doing the maths is hurting my head at the moment.

/declare TimeHour int outer 0
/declare TimeMinute int outer 0
/declare TimeSecond int outer 0
/declare HourCalc int outer 0

/varcalc TimeHour ${Macro.RunTime}/3600
/varcalc HourCalc ${TimeHour}*3600
/varcalc TimeMinute (${Macro.RunTime}-${HourCalc})/60
/varcalc TimeSecond (${Macro.RunTime})-(${TimeHour}*3600)-(${TimeMinute}*60)
/echo Running Time: ${TimeHour}h ${TimeMinute}m ${TimeSecond}s.