Advertisement
Guest User

time

a guest
Feb 27th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1.  
  2.  
  3. function toString(t)
  4.   tT = t
  5.   string = math.floor(tT/86400).."d "
  6.   tT = tT - (math.floor(tT/86400)*86400)
  7.   string = string..math.floor(tT/3600).."h "
  8.   tT = tT - (math.floor(tT/3600)*3600)
  9.   string = string..math.floor(tT/60).."m "
  10.   tT = tT - (math.floor(tT/60)*60)
  11.   string = string..math.floor(tT).."s"
  12.   return string
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement