Browse Source

Changed os.time to os.clock.

Reused some this code for the pupatt addon that towbes and I worked on. Found out that os.time appears to go down to the second. os.clock is used on sendall and appears to recognize fractions of seconds.
pull/1/head
Tornac 5 years ago
parent
commit
4b0d387216
  1. 4
      bluemage.lua

4
bluemage.lua

@ -333,8 +333,8 @@ end
-- desc: Processes the packet queue to be sent. -- desc: Processes the packet queue to be sent.
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
function bluemage.process_queue() function bluemage.process_queue()
if (os.time() >= (bluemage.timer + bluemage.delay)) then if (os.clock() >= (bluemage.timer + bluemage.delay)) then
bluemage.timer = os.time(); bluemage.timer = os.clock();
-- Ensure the queue has something to process.. -- Ensure the queue has something to process..
if (#bluemage.queue > 0) then if (#bluemage.queue > 0) then

Loading…
Cancel
Save