view tests/data/timer.js @ 963:371e1cc2c697

tests: add 80% of the Javascript API
author David Demelier <markand@malikania.fr>
date Thu, 28 Jan 2021 14:20:58 +0100
parents
children
line wrap: on
line source

count = 0;

function onLoad()
{
	if (typeof (type) === "undefined")
		throw Error("global timer type not defined");

	t = new Irccd.Timer(type, 50, function () {
		count += 1;
	});

	t.start();
}