From: sapier Date: Mon, 6 Jan 2014 14:21:22 +0000 (+0100) Subject: Add function to deregister a profiler from profiler list X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=6833e04bc55156025267c39a58a29007318129fa;p=zefram%2Fminetest%2Fminetest_engine.git Add function to deregister a profiler from profiler list --- diff --git a/src/profiler.h b/src/profiler.h index b703a2d5..e746c489 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 m_data;