Added timer implementation and tests