view tests/src/libirccd-js/js-api-timer/timer.js @ 773:8c44bbcbbab9

Misc: style, cleanup and update
author David Demelier <markand@malikania.fr>
date Fri, 26 Oct 2018 13:01:00 +0200
parents 445c071e8efb
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();
}