Jump to content

getTimerDetails


ABoHussin

Recommended Posts

Hi all ..

i have a question about getTimerDetails

I made a code to fetch the Timer information and turn it into minutes

__________________________________

if _mytimer and isTimer(_mytimer) then 
    _r,_e,_t = getTimerDetails(_mytimer) 
        if _r and _e and _t then 
            total = _r / 60 / 1000 
            outputChatBox("remain :: "..math.ceil(total)) 
        end 
    end 

______________________

Everything is good . The code works successfully

but 

I want it to bring minutes with seconds

Like this 

remain : 3 m : 15 s

3 m : 14s

any help ?

Link to comment
  • Administrators
local remaining, executesRemaining, totalExecutes = getTimerDetails(timer) -- Get the timers details
local s = remaining/1000
local clock = string.format("%.2d:%.2d", s/60%60, s%60)

something like that

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...