]> Dogcows Code - chaz/openbox/blobdiff - openbox/timer.c
add (optional) support for showing a busy cursor via startup notification
[chaz/openbox] / openbox / timer.c
index b6a82cd37fe7eba1443f3268265d70d6ffe0d4fc..e459154465ce2e615b01e3d4cd424734b91b1952 100644 (file)
@@ -15,7 +15,7 @@ static long timecompare(GTimeVal *a, GTimeVal *b)
     long r;
 
     if ((r = b->tv_sec - a->tv_sec)) return r;
-    return b->tv_usec - a->tv_sec;
+    return b->tv_usec - a->tv_usec;
     
 }
 
@@ -108,7 +108,7 @@ void timer_dispatch(GTimeVal **wait)
        
        /* the queue is sorted, so if this timer shouldn't fire, none are 
           ready */
-        if (timecompare(&now, &NEAREST_TIMEOUT) <= 0)
+        if (timecompare(&NEAREST_TIMEOUT, &now) <= 0)
            break;
 
        /* we set the last fired time to delay msec after the previous firing,
This page took 0.020867 seconds and 4 git commands to generate.