Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/livereload-js/lib/timer.js b/node_modules/livereload-js/lib/timer.js
new file mode 100644
index 0000000..6d0e2c3
--- /dev/null
+++ b/node_modules/livereload-js/lib/timer.js
@@ -0,0 +1,42 @@
+(function() {
+ var Timer;
+
+ exports.Timer = Timer = (function() {
+ function Timer(func1) {
+ this.func = func1;
+ this.running = false;
+ this.id = null;
+ this._handler = (function(_this) {
+ return function() {
+ _this.running = false;
+ _this.id = null;
+ return _this.func();
+ };
+ })(this);
+ }
+
+ Timer.prototype.start = function(timeout) {
+ if (this.running) {
+ clearTimeout(this.id);
+ }
+ this.id = setTimeout(this._handler, timeout);
+ return this.running = true;
+ };
+
+ Timer.prototype.stop = function() {
+ if (this.running) {
+ clearTimeout(this.id);
+ this.running = false;
+ return this.id = null;
+ }
+ };
+
+ return Timer;
+
+ })();
+
+ Timer.start = function(timeout, func) {
+ return setTimeout(func, timeout);
+ };
+
+}).call(this);