Have you imported `time` module in this file?