Skip to content

Instantly share code, notes, and snippets.

@wengkham
Last active November 3, 2023 10:39
Show Gist options
  • Save wengkham/f618621201d58733e246a94f3bd136fd to your computer and use it in GitHub Desktop.
Save wengkham/f618621201d58733e246a94f3bd136fd to your computer and use it in GitHub Desktop.
from threading import Timer
def callme(foo):
print(f"{foo}, I have been called")
t = Timer(10, callme, args=["hello"])
t.start()
print("Run code immediately here.")
t.join()
print("Run code after Timer ends.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment