blob: db3c8f68b28e521a3566010c21d80fee190f186e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
namespace ksys {
class BasicProfiler {
public:
class Scope {
public:
explicit Scope(const char* description) : mDescription(description) { push(description); }
~Scope() { pop(mDescription); }
Scope(const Scope&) = delete;
auto operator=(const Scope&) = delete;
private:
const char* mDescription;
};
static void push(const char* description);
static void pop(const char* description);
};
} // namespace ksys
|