B"H view1090: sleep a bit between loops
view1090 was using close to 100% CPU before, with the non-blocking commits and the reconnection code. sleep a bit between loop iterations to keep CPU usage low. CPU usage with this addition was down to <1% in testing.
This commit is contained in:
parent
350a57f858
commit
ec09cc7a71
|
@ -291,6 +291,7 @@ int main(int argc, char **argv) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
modesReadFromClient(c,"",decodeBinMessage);
|
modesReadFromClient(c,"",decodeBinMessage);
|
||||||
|
usleep(100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The user has stopped us, so close any socket we opened
|
// The user has stopped us, so close any socket we opened
|
||||||
|
|
Loading…
Reference in a new issue