view tests/src/libirccd-js/jsapi-timer/timer.js @ 757:97b356010785

Irccd: create (command|jsapi)::registry Make two list of constructor functions to initialize all command and all Javascript modules to avoid duplicating efforts in case of change. While here, update test fixtures to load all of them for simplicity.
author David Demelier <markand@malikania.fr>
date Mon, 06 Aug 2018 21:27:00 +0200
parents 9fbd1700435b
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();
}