Implemented non-windows version of timer.