summaryrefslogtreecommitdiffstats
path: root/test/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.lua')
-rwxr-xr-xtest/test.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test.lua b/test/test.lua
index 57d76f2..8402e05 100755
--- a/test/test.lua
+++ b/test/test.lua
@@ -23,11 +23,18 @@ local function sleep(n)
utils.sleeper():sleep(n)
end
+local function timer(n, f, ...)
+ utils.spawn(function(...)
+ sleep(n)
+ return f(...)
+ end, ...)
+end
+
--print('package.cpath = ', package.cpath)
print 'Saying booh in 2.5 seconds'
-utils.timer(2.5, function() print 'Booh!' end)
+timer(2.5, function() print 'Booh!' end)
print 'Sleeping 5 seconds'