Guest User

Fast Lua Timer

a guest
Feb 2nd, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. --Lua Timer made by dom2mom
  2.  
  3. local time = os.date("*t")
  4.  
  5. delay = PUT DELAY HERE
  6.  
  7. timer = time.PUT HOUR, MIN, OR SEC HERE
  8.  
  9. print (string.format("The start time is %d:%d:%d",time.hour, time.min, time.sec))
  10.  
  11. local isTimerUp = false
  12.  
  13. while isTimerUp == false do
  14.  
  15.     time = os.date("*t")
  16.    
  17.     if time.PUT HOUR, MIN, OR SEC HERE == timer + delay then
  18.  
  19.         print (string.format("The end time is %d:%d:%d",time.hour, time.min, time.sec))
  20.    
  21.         isTimerUp = true
  22.    
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment