X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdebug%2Fprofilingscope.cpp;h=39222342123848e1ba7d768592bff0fbd981b2d1;hb=1e54e9f4b8cd32db5c224f971207aedee8bbe3dd;hp=f92749b214f588357c38baa22f53960973aa9fdd;hpb=e7638f74d3e4869020a19dfa1cc700d52373f01c;p=libs%2Fcore.git diff --git a/source/debug/profilingscope.cpp b/source/debug/profilingscope.cpp index f92749b..3922234 100644 --- a/source/debug/profilingscope.cpp +++ b/source/debug/profilingscope.cpp @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of libmspcore +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include "../time/utils.h" #include "profilingscope.h" @@ -15,10 +22,10 @@ ProfilingScope::ProfilingScope(Profiler &p, const string &n): ProfilingScope::~ProfilingScope() { - const Time::TimeDelta dt=start_t-Time::now(); + const Time::TimeDelta dt = Time::now()-start_t; if(parent) { - parent->child_t+=dt; + parent->child_t += dt; profiler.record(name, parent->name, dt, child_t); } else