Change await_notifications() timeout if something is invalidated (less CPU used when...
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 20 Feb 2005 13:47:06 +0000 (13:47 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 20 Feb 2005 13:47:06 +0000 (13:47 +0000)
bigscreen/ccbs_bigscreen.cpp

index 829f84d..96c1a4f 100644 (file)
@@ -68,10 +68,12 @@ void main_loop(pqxx::connection &conn)
 
        if (mainscreen->check_invalidated()) {
                mainscreen->draw(framebuf);
+               ptc_update(framebuf);
+               conn.await_notification(0, 10000);
+       } else {
+               ptc_update(framebuf);
+               conn.await_notification(0, 200000);
        }
-       ptc_update(framebuf);
-
-       conn.await_notification(0, 50000);
 }
 
 int main(int argc, char **argv)