3 This file is part of libmspcore
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include "../time/utils.h"
9 #include "profilingscope.h"
16 ProfilingScope::ProfilingScope(Profiler &p, const string &n):
19 parent(profiler.enter(this)),
23 ProfilingScope::~ProfilingScope()
25 const Time::TimeDelta dt=Time::now()-start_t;
29 profiler.record(name, parent->name, dt, child_t);
32 profiler.record(name, string(), dt, child_t);
33 profiler.enter(parent);