Skip to content

Instantly share code, notes, and snippets.

@thoolihan
Created July 13, 2018 15:30
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 thoolihan/e5aaaedc68163c8e776dd3b5894a2e5e to your computer and use it in GitHub Desktop.
Save thoolihan/e5aaaedc68163c8e776dd3b5894a2e5e to your computer and use it in GitHub Desktop.
python consistent start time
from datetime import datetime
def get_curr_time():
return datetime.now().strftime("%Y.%m.%d.%H.%M.%S")
def get_start_time():
return _start_time if _start_time else get_curr_time()
_start_time = get_start_time()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment