local skynet = require "skynet" local function timer(ti, listener) local delete = function() listener = nil end skynet.timeout(ti, function() if listener then listener() end end) return delete end return timer