diff options
author | Kim Alvefur <zash@zash.se> | 2018-07-08 00:37:01 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-07-08 00:37:01 +0200 |
commit | 9c48fc472619e4a08278eb544f61ae7e62310e4b (patch) | |
tree | 2f67f67938b9ebd8a82242cedf6879f5cf149804 /util/timer.lua | |
parent | b58c44e43aab9f7f6c2793fc71bb2177e9e90084 (diff) | |
download | prosody-9c48fc472619e4a08278eb544f61ae7e62310e4b.tar.gz prosody-9c48fc472619e4a08278eb544f61ae7e62310e4b.zip |
util.{async,timer}: Move sleep() to reduce dependencies of util.timer
Diffstat (limited to 'util/timer.lua')
-rw-r--r-- | util/timer.lua | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/util/timer.lua b/util/timer.lua index 424d44fa..22f547df 100644 --- a/util/timer.lua +++ b/util/timer.lua @@ -10,7 +10,6 @@ local indexedbheap = require "util.indexedbheap"; local log = require "util.logger".init("timer"); local server = require "net.server"; local get_time = require "util.time".now -local async = require "util.async"; local type = type; local debug_traceback = debug.traceback; local tostring = tostring; @@ -104,16 +103,9 @@ local function reschedule(id, delay) return id; end -local function sleep(s) - local wait, done = async.waiter(); - add_task(s, done); - wait(); -end - return { add_task = add_task; stop = stop; reschedule = reschedule; - sleep = sleep; }; |