Previous frame rate code was a busy loop and didn't give CPU any rest.
To reduce CPU and power usage added a sleep call based on time till next
run with a buffer to account for sleep non-determinism.