X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=bigscreen%2Fccbs_bigscreen.cpp;h=dfb025f92cf72b0773a6c000b5ebee35686cbb41;hb=6e40dbdfce9194249658112b2837565b47b34b4d;hp=435d06aa7ff86f2cf23f6414d71113e3efa66f37;hpb=a8f5648a4186b79c28c0c98f647802fc7ee36af8;p=ccbs diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 435d06a..dfb025f 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -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)