diff options
Diffstat (limited to 'server/src/service.lua')
-rw-r--r-- | server/src/service.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index 2e7f43b9..ade3b2eb 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -806,20 +806,20 @@ function mt:listen() local _, out = async.run 'proto' self._proto = out - local clock = os.clock() + local timerClock = 0.0 while true do local startClock = os.clock() - local delta = os.clock() - clock async.onTick() self:onTick() + local delta = os.clock() - timerClock local suc, err = xpcall(updateTimer, log.error, delta) if not suc then io.stderr:write(err) io.stderr:flush() end + timerClock = os.clock() - clock = os.clock() local passedClock = os.clock() - startClock if passedClock > 0.1 then thread.sleep(0.0) |