Move time related operations to a separate file