mirror of
https://github.com/KevinMidboe/mktxp-no-cli.git
synced 2025-10-29 17:50:23 +00:00
DS refactor, fixes/optimizations
This commit is contained in:
@@ -37,15 +37,6 @@ def temp_dir(quiet = True):
|
||||
if not quiet:
|
||||
print ('Error while removing a tmp dir: {}'.format(e.args[0]))
|
||||
|
||||
class Benchmark:
|
||||
def __enter__(self):
|
||||
self.start = default_timer()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
self.time = default_timer() - self.start
|
||||
|
||||
|
||||
class CmdProcessingError(Exception):
|
||||
pass
|
||||
|
||||
@@ -264,3 +255,12 @@ class RepeatableTimer:
|
||||
break
|
||||
self.finished.wait(self.interval)
|
||||
|
||||
class Benchmark:
|
||||
def __enter__(self):
|
||||
self.start = default_timer()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
self.time = default_timer() - self.start
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user