From 49aba7f9193decaea11c17e53a1205dbacc56329 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 20 Feb 2005 13:47:06 +0000 Subject: [PATCH] Change await_notifications() timeout if something is invalidated (less CPU used when there's no action) --- bigscreen/ccbs_bigscreen.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- 2.39.2