Created
July 13, 2018 15:30
-
-
Save thoolihan/e5aaaedc68163c8e776dd3b5894a2e5e to your computer and use it in GitHub Desktop.
python consistent start time
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
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