X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Ftimer.lua;h=3713625db3d6cbcb3d2c78fe5ff79c95aff13b79;hb=59224f73ca26a00292f127e081af3cf47f57ae1f;hp=af1e57b6d176c487b47c5e2d94e40c4eddb08247;hpb=5a1000e8e61beb0c9ecf56ad9342d5b7031f9b49;p=prosody.git diff --git a/util/timer.lua b/util/timer.lua index af1e57b6..3713625d 100644 --- a/util/timer.lua +++ b/util/timer.lua @@ -1,7 +1,7 @@ -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain --- +-- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- @@ -17,7 +17,7 @@ local type = type; local data = {}; local new_data = {}; -module "timer" +local _ENV = nil; local _add_task; if not server.event then @@ -42,7 +42,7 @@ if not server.event then end new_data = {}; end - + local next_time = math_huge; for i, d in pairs(data) do local t, callback = d[1], d[2]; @@ -78,6 +78,6 @@ else end end -add_task = _add_task; - -return _M; +return { + add_task = _add_task; +};