Expose getPointedThing to Lua
[oweals/minetest.git] / src / util / timetaker.h
index 5512c205fe611ab72263966bc1e3f5efb2c52fcf..34564ee4bbd9a5c9bd705ebb48c6f20696b016e7 100644 (file)
@@ -30,24 +30,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class TimeTaker
 {
 public:
-       TimeTaker(const char *name, u32 *result=NULL,
-               TimePrecision=PRECISION_MILLI);
+       TimeTaker(const std::string &name, u64 *result=nullptr,
+               TimePrecision prec=PRECISION_MILLI);
 
        ~TimeTaker()
        {
                stop();
        }
 
-       u32 stop(bool quiet=false);
+       u64 stop(bool quiet=false);
 
-       u32 getTimerTime();
+       u64 getTimerTime();
 
 private:
-       const char *m_name;
-       u32 m_time1;
-       bool m_running;
+       std::string m_name;
+       u64 m_time1;
+       bool m_running = true;
        TimePrecision m_precision;
-       u32 *m_result;
+       u64 *m_result = nullptr;
 };
 
 #endif