]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/profilingscope.h
Refactor Profiler
[libs/core.git] / source / debug / profilingscope.h
index 132c4183bf883e2353e665c38ced3e00e5449e7d..107688886a931db5891049551e6aa1ddc2c2ecba 100644 (file)
@@ -1,14 +1,7 @@
-/* $Id$
-
-This file is part of libmspcore
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_DEBUG_PROFILINGSCOPE_H_
 #define MSP_DEBUG_PROFILINGSCOPE_H_
 
-#include "../time/timestamp.h"
+#include <msp/time/timestamp.h>
 #include "profiler.h"
 
 namespace Msp {
@@ -25,14 +18,21 @@ private:
        Profiler &profiler;
        std::string name;
        ProfilingScope *parent;
-       Time::TimeStamp start_t;
-       Time::TimeDelta child_t;
+       Time::TimeStamp entry_time;
+       Time::TimeDelta time_spent;
+       Time::TimeDelta child_time;
 
        ProfilingScope(const ProfilingScope &);
        ProfilingScope &operator=(const ProfilingScope &);
 public:
        ProfilingScope(Profiler &p, const std::string &n);
        ~ProfilingScope();
+
+       const std::string &get_name() const { return name; }
+       const ProfilingScope *get_parent() const { return parent; }
+       const Time::TimeStamp &get_entry_time() const { return entry_time; }
+       const Time::TimeDelta &get_time_spent() const { return time_spent; }
+       const Time::TimeDelta &get_child_time() const { return child_time; }
 };
 
 } // namespace Debug