comparison 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
comparison
equal deleted inserted replaced
772:f5ccf65ae929 773:8c44bbcbbab9
1 count = 0; 1 count = 0;
2 2
3 function onLoad() 3 function onLoad()
4 { 4 {
5 if (typeof (type) === "undefined") 5 if (typeof (type) === "undefined")
6 throw Error("global timer type not defined"); 6 throw Error("global timer type not defined");
7 7
8 t = new Irccd.Timer(type, 50, function () { 8 t = new Irccd.Timer(type, 50, function () {
9 count += 1; 9 count += 1;
10 }); 10 });
11 11
12 t.start(); 12 t.start();
13 } 13 }