Added more funcitonality (delay, oneshot and periodic timers) to timer.