Make sure to set the maxwait before each select call
authorWilliam Lash <william.lash@gmail.com>
Sun, 30 Jun 2019 01:08:41 +0000 (01:08 +0000)
committerDavid Griffith <dave@661.org>
Sun, 30 Jun 2019 01:08:41 +0000 (01:08 +0000)
commitec03ba2a3bc4dc2328b3278c61006a957fbdb245
treec08e6d84f01d3b998bb89167ae2eb8faf851a36b
parentd59ff738836822b4b9957f14245bde61b2e578e7
Make sure to set the maxwait before each select call

On linux at least select will update the timeout value if it returns
before the timeout is up.

It seems that simply moving the ````maxwait.tv_usec=10000;```` statement inside the ````while(1)```` loop significantly reduced CPU usage.  We'll keep the timeout at 10 msec until the delay becomes noticable, which so far isn't.
src/curses/ux_input.c