]> git.sesse.net Git - ccbs/commitdiff
Use await_notification instead of sleep(), gives us much better response time.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 19 Feb 2005 17:01:01 +0000 (17:01 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 19 Feb 2005 17:01:01 +0000 (17:01 +0000)
bigscreen/ccbs_bigscreen.cpp

index 435d06aa7ff86f2cf23f6414d71113e3efa66f37..dfb025f92cf72b0773a6c000b5ebee35686cbb41 100644 (file)
@@ -45,7 +45,7 @@ void main_loop(pqxx::connection &conn)
 {
        if (active_tournament.id == -1) {
                // No active tournament, sleep a second or so and exit
-               sleep(1);
+               conn.await_notification(1, 0);
                return;
        }
 
@@ -58,7 +58,7 @@ void main_loop(pqxx::connection &conn)
        memcpy(framebuf, screenbuf, 800*600*4);
 
        ptc_update(framebuf);
-       sleep(1);
+       conn.await_notification(0, 50000);
 }
 
 int main(int argc, char **argv)