create Timer class and define its methods