Comparison

util/timer.lua @ 4812:5bcdc384e485

util.timer: Remove unnecessary require calls, fixes a traceback (thanks nulani)
author Matthew Wild <mwild1@gmail.com>
date Thu, 03 May 2012 18:59:06 +0100
parent 4808:07d0a3a75c8a
child 4871:b2d177f2febc
comparison
equal deleted inserted replaced
4811:1d1fdfa29f06 4812:5bcdc384e485
58 end 58 end
59 end 59 end
60 return next_time; 60 return next_time;
61 end); 61 end);
62 else 62 else
63 local event = require "net.server".event; 63 local event = server.event;
64 local event_base = require "net.server".event_base; 64 local event_base = server.event_base;
65 local EVENT_LEAVE = (event.core and event.core.LEAVE) or -1; 65 local EVENT_LEAVE = (event.core and event.core.LEAVE) or -1;
66 66
67 function _add_task(delay, callback) 67 function _add_task(delay, callback)
68 local event_handle; 68 local event_handle;
69 event_handle = event_base:addevent(nil, 0, function () 69 event_handle = event_base:addevent(nil, 0, function ()