]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/profiler.h
make formspec textarea wordwrap
[dragonfireclient.git] / src / profiler.h
index e22a865c070bafce51a9e580cd2a7faa479d38a7..e746c489c525355a92d188aeb864676fa505f468 100644 (file)
@@ -22,8 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes.h"
 #include <string>
-#include <jmutex.h>
-#include <jmutexautolock.h>
+#include "jthread/jmutex.h"
+#include "jthread/jmutexautolock.h"
 #include <map>
 #include "util/timetaker.h"
 #include "util/numeric.h" // paging()
@@ -38,7 +38,6 @@ class Profiler
 public:
        Profiler()
        {
-               m_mutex.Init();
        }
 
        void add(const std::string &name, float value)
@@ -165,6 +164,13 @@ class Profiler
                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;