Extract time functions to own ns