1 #include <msp/time/utils.h>
2 #include "profilingscope.h"
9 ProfilingScope::ProfilingScope(Profiler &p, const string &n):
12 parent(profiler.enter(this)),
13 entry_time(Time::now())
16 ProfilingScope::~ProfilingScope()
18 time_spent = Time::now()-entry_time;
20 parent->child_time += get_time_spent();
21 profiler.record(*this);
22 profiler.enter(parent);