Skip to content

Instantly share code, notes, and snippets.

@mrchnk
Created May 17, 2021 09:25
Show Gist options
  • Save mrchnk/cc22b6389da8db197db027d0e588f242 to your computer and use it in GitHub Desktop.
Save mrchnk/cc22b6389da8db197db027d0e588f242 to your computer and use it in GitHub Desktop.
import time
def timeit(f):
def _f(*args, **nargs):
begin = time.time()
r = f(*args, **nargs)
end = time.time()
print('Time %2.22f ms' % ((end - begin) * 1000))
return r
return _f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment