Software /
code /
verse
Comparison
init.lua @ 42:6006e6bb1c28
verse: Add verse.add_task(delay, callback) to add timer functions using util.timer
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 03 Jan 2010 18:01:54 +0000 |
parent | 30:9c96318913f7 |
child | 44:37396504de5f |
comparison
equal
deleted
inserted
replaced
41:1a1bd8cd4bdb | 42:6006e6bb1c28 |
---|---|
19 t.id = tostring(t):match("%x*$"); | 19 t.id = tostring(t):match("%x*$"); |
20 t.logger = logger.init(t.id); | 20 t.logger = logger.init(t.id); |
21 t.events = events.new(); | 21 t.events = events.new(); |
22 return setmetatable(t, stream); | 22 return setmetatable(t, stream); |
23 end | 23 end |
24 | |
25 verse.add_task = require "util.timer".add_task; | |
24 | 26 |
25 function verse.loop() | 27 function verse.loop() |
26 return server.loop(); | 28 return server.loop(); |
27 end | 29 end |
28 | 30 |