Refactoring: moved time methods to an external module.