Commit 014a30e5 by John Eskew

global in methods

parent 580a827b
......@@ -21,6 +21,7 @@ class CodeBlockTimer(object):
self.run_id = None
def __enter__(self):
global __m
if __m.nest_level == 0:
self.run_id = self.data_store.run_id()
__m.nest_level += 1
......@@ -28,6 +29,7 @@ class CodeBlockTimer(object):
return self
def __exit__(self, *args):
global __m
end = self.timer()
self.elapsed_secs = end - self.start
self.elapsed = self.elapsed_secs * 1000 # millisecs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment