From: sapier Date: Mon, 6 Jan 2014 14:21:22 +0000 (+0100) Subject: Add function to deregister a profiler from profiler list X-Git-Tag: 0.4.10~344 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6833e04bc55156025267c39a58a29007318129fa;p=oweals%2Fminetest.git Add function to deregister a profiler from profiler list --- 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 m_data;