moai/moai-dev — pull request #950 by seebs (2014-07-12 04:16:10+00:00)
Title: Use timer for OS X

The configuration of the SDL timer was contingent on
"if(UNIX AND NOT APPLE)" or "if(WINDOWS)", with no attempt to
configure it for OS X.

The Unix timer is maintained for OS X and works fine. Copying
and pasting a few lines into the APPLE section fixes it.

What this fixes: Without it, if you use Spaces/Mission Control
and page such that the app isn't rendering, it uses 100% of CPU.
Also SDL_GetTicks() always returns zero and SDL_Delay() always
returns instantly.