Updated Timer class with pausing.