Timer bug fixes

-Fixed a timer bug
-Added timer delay function