Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function normalTimeFormat(len)
  2.  
  3. local len = math.abs(math.floor(len))
  4.  
  5. local h = math.floor(len / 60 / 60)
  6. local m = math.floor(len / 60 - h * 60)
  7. local s = math.floor(len - m * 60 - h * 60 * 60)
  8.  
  9. return string.format("%.2d:%.2d:%.2d", h, m, s)
  10.  
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement