moved time functions to their own module