Encapsulate timer into simple class