Created
May 30, 2022 15:56
-
-
Save Bloofer/c41132319726a1f35896811b2b70ae40 to your computer and use it in GitHub Desktop.
single_thread
This file contains 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 | |
from threading import Thread | |
COUNT = 50000000 | |
def countdown(n): | |
while n>0: | |
n -= 1 | |
start = time.time() | |
countdown(COUNT) | |
end = time.time() | |
print('Time taken in seconds -', end - start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment