3 This file is part of libmspcore
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_DEBUG_PROFILINGSCOPE_H_
9 #define MSP_DEBUG_PROFILINGSCOPE_H_
11 #include "../time/timestamp.h"
18 RAII timing class to accompany Profiler. Timing starts when an object is
19 created and ends when it goes out of scope. If there was another object in an
20 outer scope, it is notified of the time used in inner scopes.
27 ProfilingScope *parent;
28 Time::TimeStamp start_t;
29 Time::TimeDelta child_t;
31 ProfilingScope(const ProfilingScope &);
32 ProfilingScope &operator=(const ProfilingScope &);
34 ProfilingScope(Profiler &p, const std::string &n);