Skip to content

Instantly share code, notes, and snippets.

@jianghu52
Created June 8, 2014 02:43
Show Gist options
  • Save jianghu52/377cd24febe2c2fda97c to your computer and use it in GitHub Desktop.
Save jianghu52/377cd24febe2c2fda97c to your computer and use it in GitHub Desktop.
import datetime
def timeit(func):
def warp(*args):
print "begin at " + str(datetime.datetime.now())
func(*args)
print "end at " + str(datetime.datetime.now())
return warp
@timeit
def foo2(*args):
print "function run"
foo2()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment