util.timer: Defer to selected net.server if it implements this API
E.g. net.server_epoll is very close and could easily be adapted to
support this.
--- a/util/timer.lua Mon Jun 29 12:51:28 2020 +0100
+++ b/util/timer.lua Mon Jun 29 16:37:58 2020 +0200
@@ -16,6 +16,11 @@
local xpcall = require "util.xpcall".xpcall;
local math_max = math.max;
+if server.timer then
+ -- The selected net.server implements this API, so defer to that
+ return server.timer;
+end
+
local _ENV = nil;
-- luacheck: std none