From 8fbacba82e9d655e6d2f993969741dcc4abd61d1 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 21 Dec 2017 01:15:16 +1100 Subject: [PATCH] [client] make startup sleep nicer on the CPU --- client/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index 420259cf..4cd43283 100644 --- a/client/main.c +++ b/client/main.c @@ -165,10 +165,13 @@ void mainThread() { while(state.running) { - nsleep(1000); if (state.started) + { if (!state.lgr->render(state.lgrData, state.window)) break; + } + else + usleep(1000); } }