add an example timer script

This commit is contained in:
Stephen Birarda 2014-01-31 16:40:24 -08:00
parent d2fd4bf445
commit a7f2406505

5
examples/timer.js Normal file
View file

@ -0,0 +1,5 @@
var timer = new Timer();
timer.interval = 1000;
timer.singleShot = true; // set this is you only want the timer to fire once
timer.timeout.connect(function() { print("TIMER FIRED!"); });
timer.start();