Skip to content
Snippets Groups Projects
Commit 1e5346313963 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

statprof: return state from stop()

I don't like global variables. Have stop() return the captured
state so callers can pass data to the display function.
parent d4db88a26ad5
No related branches found
No related tags found
No related merge requests found
......@@ -324,6 +324,8 @@
if statprofpath:
save_data(statprofpath)
return state
def save_data(path):
with open(path, 'w+') as file:
file.write(str(state.accumulated_time) + '\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment