Fix warning about time being deprecated