Advertisement
ee_ingo

Monitor

Feb 6th, 2023 (edited)
1,086
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. while true do
  2.   -- Get the current time
  3.   local time = os.time()
  4.   local hour = math.floor(time / 3600) % 24
  5.   local minute = math.floor(time / 60) % 60
  6.   local second = time % 60
  7.  
  8.   -- Display the time
  9.   print(string.format("%02d:%02d:%02d", hour, minute, second))
  10.  
  11.   os.sleep(1)
  12. end
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement