1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 from __future__ import print_function
6 from builtins import object
10 def __init__(self, verbose=False):
11 self.verbose = verbose
14 self.start = time.time()
17 def __exit__(self, *args):
18 self.end = time.time()
19 self.secs = self.end - self.start
20 self.msecs = self.secs * 1000 # millisecs
22 print('elapsed time: %f ms' % self.msecs)