0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00
easy_profiler/src/profile_manager.h

41 lines
1.2 KiB
C
Raw Normal View History

2016-02-16 23:21:12 +03:00
/**
Lightweight profiler library for c++
Copyright(C) 2016 Sergey Yagovtsev
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
/**/
#ifndef ___PROFILER____MANAGER____H______
#define ___PROFILER____MANAGER____H______
#include "profiler/profiler.h"
class ProfileManager
{
ProfileManager();
ProfileManager(const ProfileManager& p) = delete;
ProfileManager& operator=(const ProfileManager&) = delete;
static ProfileManager* m_profileManager;
bool m_isEnabled = false;
public:
static ProfileManager* instance();
void registerMark(profiler::Mark* _mark);
void endBlock();
void setEnabled(bool isEnable);
};
2016-02-16 23:25:12 +03:00
#endif