Mercurial > irccd
diff tests/js-timer/timer-pending.js @ 0:1158cffe5a5e
Initial import
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 08 Feb 2016 16:43:14 +0100 |
parents | |
children | 6635b9187d71 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/js-timer/timer-pending.js Mon Feb 08 16:43:14 2016 +0100 @@ -0,0 +1,14 @@ +count = 0; + +function onLoad() +{ + t = new Irccd.Timer(Irccd.Timer.Repeat, 500, function () { + count += 1; + }); + + t.start(); + + /* Force the plugin to wait so that timer push some events in the irccd's queue */ + Irccd.System.sleep(3); + t.stop(); +}