#ifndef MSP_DEBUG_PROFILINGSCOPE_H_
#define MSP_DEBUG_PROFILINGSCOPE_H_
+#include <msp/core/noncopyable.h>
#include <msp/time/timestamp.h>
#include "profiler.h"
created and ends when it goes out of scope. If there was another object in an
outer scope, it is notified of the time used in inner scopes.
*/
-class ProfilingScope
+class ProfilingScope: private NonCopyable
{
private:
Profiler &profiler;
std::string name;
- ProfilingScope *parent;
+ ProfilingScope *parent = nullptr;
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();