Idle Time Function

A function that takes a number of seconds and returns the value in HH:MM:SS (hour, minute, second) format.

Author: Unknown
Category: Functions
Functions: div(), gt(), idle(), mul(), setq(), sub(), switch(), u().


Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Idle Time Function

&FUN_TIME me=[setq(0,div(%0,3600))][switch(gt(%q0,9),0,0)]%q0:[setq(1,[div(sub(%0,[mul(div(%0,3600),3600)]),60)])][switch(gt(%q1,9),0,0)]%q1:[setq(2,[sub(%0,[mul(div(%0,60),60)])])][switch(gt(%q2,9),0,0)]%q2
&IDLE-1 me=$idle:think ufun(fun_time,idle(me))