Skip to content

Commit

Permalink
Create timer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tatianab committed Oct 17, 2014
1 parent ca6fe42 commit dd59fe2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions primecurves/primecurves/timer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Timer - a quick function to time
# how long it takes to compute something

import timeit

def time(functionToCall, repititions):
print "TIMER: "
setup = "from ellipticcurves import *"
timer = timeit.Timer(functionToCall, setup)
print timer.timeit(repititions)

0 comments on commit dd59fe2

Please sign in to comment.