Comparison

util/timer.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parent 10981:e6c1e92cc7a7
child 11264:2cdcf55c6dd5
comparison
equal deleted inserted replaced
11199:6c7c50a4de32 11200:bf8f2da84007
13 local type = type; 13 local type = type;
14 local debug_traceback = debug.traceback; 14 local debug_traceback = debug.traceback;
15 local tostring = tostring; 15 local tostring = tostring;
16 local xpcall = require "util.xpcall".xpcall; 16 local xpcall = require "util.xpcall".xpcall;
17 local math_max = math.max; 17 local math_max = math.max;
18
19 if server.timer then
20 -- The selected net.server implements this API, so defer to that
21 return server.timer;
22 end
18 23
19 local _ENV = nil; 24 local _ENV = nil;
20 -- luacheck: std none 25 -- luacheck: std none
21 26
22 local _add_task = server.add_task; 27 local _add_task = server.add_task;