import time

def timeit(func):

  def wrapper():

    start = time.clock()

    func() end =time.clock()

    print 'used:', end - start

    return wrapper

@timeit

def foo():

  print 'in foo()' foo()

 

相关文章:

  • 2021-09-16
  • 2022-12-23
  • 2021-07-24
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案