lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Apr 12, 2015 at 7:29 PM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
> I’m looking for an efficient timer mechanism in Lua. Does anyone know of any
> Lua based timing-wheel implementations? (before I roll my own)

Hi,

I have seen the following timers in Lua:

 * posix.unistd.sleep [1]
 * posix.time.nanosleep [2]
 * posix.curses.napms [3]
 * ngx.sleep [4]

[1] https://luaposix.github.io/luaposix/modules/posix.unistd.html#sleep
[2] https://luaposix.github.io/luaposix/modules/posix.time.html#nanosleep
[3] https://luaposix.github.io/luaposix/modules/posix.curses.html#napms
[4] http://wiki.nginx.org/HttpLuaModule#ngx.sleep

Best regards,
Boris Nagaev