Skip to content
Advertisement

how to setup a timer in Python?

I would like to create a timer in Python. After I run the .py class I would like a method to be called every hour in 12 hour period, after 12 hours end the program closes. How can I do this?

I want something like:

JavaScript

Advertisement

Answer

use time.sleep()

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement