small refactoring for timer singleton