From: Steinar H. Gunderson Date: Sun, 20 Feb 2005 13:47:06 +0000 (+0000) Subject: Change await_notifications() timeout if something is invalidated (less CPU used when... X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=49aba7f9193decaea11c17e53a1205dbacc56329 Change await_notifications() timeout if something is invalidated (less CPU used when there's no action) --- diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 829f84d..96c1a4f 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -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)