pariahsoft/Driftwood — pull request #36 by jamer (2014-05-20 05:42:55+00:00)
Title: more consistent frame rate; measure time in seconds

Driftwood's existing timing system would oversleep, preventing it from reaching the requested number of ticks per second.

This patch should fix the issue. Further, this patch changes timing measurements from integer milliseconds to float seconds.

Commit message:
Recognize that OS will be latent in resuming application from sleep (by design). Compensate by reducing requested sleep time and performing a slightly more precise, albiet less efficient, busy wait at the end to achieve consistent tick rate.