diff options
author | sapier <Sapier at GMX dot net> | 2014-01-06 15:21:22 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-01-06 15:26:24 +0100 |
commit | 6833e04bc55156025267c39a58a29007318129fa (patch) | |
tree | a3326332cce2ad32ff12fba0f1b006c76bf4fcce | |
parent | d76957ee22c27adab89cee551e3ab1c85d8717cc (diff) | |
download | minetest-6833e04bc55156025267c39a58a29007318129fa.tar.gz minetest-6833e04bc55156025267c39a58a29007318129fa.tar.bz2 minetest-6833e04bc55156025267c39a58a29007318129fa.zip |
Add function to deregister a profiler from profiler list
-rw-r--r-- | src/profiler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/profiler.h b/src/profiler.h index b703a2d5b..e746c489c 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -164,6 +164,13 @@ public: m_graphvalues.clear(); } + void remove(const std::string& name) + { + JMutexAutoLock lock(m_mutex); + m_avgcounts.erase(name); + m_data.erase(name); + } + private: JMutex m_mutex; std::map<std::string, float> m_data; |