nSun

ComputerCraft lib

Mar 29th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. -- Temps en base 20 min pour 1 jour
  2. function time2str( nTime )
  3.     if not nTime then nTime = os.clock() end
  4.     local ts = math.floor( nTime )
  5.     local m = math.floor( ts / 60 )
  6.     local s = ts % 60
  7.     m = m % 20
  8.     if m < 10 then m = "0"..m end
  9.     if s < 10 then s = "0"..s end
  10.     return m..":"..s
  11. end
Advertisement
Add Comment
Please, Sign In to add comment