Waiting between frames

Corrected the horrific empty while loop to wait between frames. I corrected the problem. Apparently I don't understand inline function in c++.