Add function to deregister a profiler from profiler list 1068/head
authorsapier <Sapier at GMX dot net>
Mon, 6 Jan 2014 14:21:22 +0000 (15:21 +0100)
committersapier <Sapier at GMX dot net>
Mon, 6 Jan 2014 14:26:24 +0000 (15:26 +0100)
src/profiler.h

index b703a2d5b03fe489776c3bae3bb03c3bc0b9e88c..e746c489c525355a92d188aeb864676fa505f468 100644 (file)
@@ -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;