Skip to content

Instantly share code, notes, and snippets.

@nvdv
Created October 4, 2016 08:56
Show Gist options
  • Save nvdv/b23c035d10a8f80d220bf9b2ac108988 to your computer and use it in GitHub Desktop.
Save nvdv/b23c035d10a8f80d220bf9b2ac108988 to your computer and use it in GitHub Desktop.
How profilers work - timer
import time
start_time = time.time()
primes = get_primes(1000)
total_time = time.time() - start_time
print("Total time is %f s" % total_time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment