Makes fps-handling more performant.

Previously, "usleep(1)" was used to sleep when handling the fps.
While this should not cause any issues when under heavy or medium
load, since there would be little sleeping then, it may cause
issues in cases with no or light load, especially on systems with
very high sleep resolution. This commit should eliminate or reduce
that issue considerably by increasing the time slept depending
on how much time ought to be slept. The implementation still
seeks to be conservative, in order to avoid oversleeping.