Created
October 29, 2018 11:24
-
-
Save sankalpjonn/25ba9103f47b58b2440d8b189c96bc7a to your computer and use it in GitHub Desktop.
Periodic task using time.sleep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def foo(): | |
print time.ctime() | |
while True: | |
foo() | |
time.sleep(1) | |
#Mon Oct 29 16:54:07 2018 | |
#Mon Oct 29 16:54:08 2018 | |
#Mon Oct 29 16:54:09 2018 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment