Skip to content

Instantly share code, notes, and snippets.

@Bloofer
Created May 30, 2022 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bloofer/c41132319726a1f35896811b2b70ae40 to your computer and use it in GitHub Desktop.
Save Bloofer/c41132319726a1f35896811b2b70ae40 to your computer and use it in GitHub Desktop.
single_thread
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