Skip to content

Instantly share code, notes, and snippets.

@gamesbook
Created March 28, 2021 15:42
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 gamesbook/7269d1b5b3b9298e8cb87bac80d964d2 to your computer and use it in GitHub Desktop.
Save gamesbook/7269d1b5b3b9298e8cb87bac80d964d2 to your computer and use it in GitHub Desktop.
Log time for process
import time
import logging
logger = logging.getLogger(__name__)
t0 = time.process_time()
time.sleep(3)
logger.warning("Time elapsed: %3.6f", (time.process_time() - t0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment