gitlive.js
authorAlan Knowles <alan@wideboy.(none)>
Wed, 28 Apr 2010 14:49:25 +0000 (22:49 +0800)
committerAlan Knowles <alan@wideboy.(none)>
Wed, 28 Apr 2010 14:49:25 +0000 (22:49 +0800)
gitlive.js

index fbc5bdb..7fc0f6f 100644 (file)
@@ -45,9 +45,15 @@ var monitor = new Monitor({
     start: function() {
         var _this = this;
         this.lastAdd = new Date();
+        
         Glib.idle_add(PRIORITY_LOW, function() {
+            if (!_this.queue.length) {
+                return o;
+            }
+            Math.floor(((new Date()) - this.lastAdd) / 100)
             _this.runQueue();
         },null,null);
+        
         Monitor.prototype.start.call(this);
         var notification = new Notify.Notification({
             summary: "Git Live",