Ported the timer functions to OS X