1 from __future__ import print_function
2 from builtins import object
6 def __init__(self, verbose=False):
10 self.start = time.time()
13 def __exit__(self, *args):
14 self.end = time.time()
15 self.secs = self.end - self.start
16 self.msecs = self.secs * 1000 # millisecs
18 print('elapsed time: %f ms' % self.msecs)