reduced CPU usage when paused simulation and no keyboard input
patch to resting state detection