Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, timeit
- def test():
- time.sleep(1)
- all_executions = timeit.repeat(
- setup="from __main__ import test",
- stmt="test()", repeat=2, number=1
- )
- average = sum(all_executions) / len(all_executions)
- print(average)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement