aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2016-03-06 14:31:16 -0500
committerShadowNinja <shadowninja@minetest.net>2017-04-28 14:43:18 -0400
commitb662a4577d692329b9ca83525e6039f2ddcd1ac1 (patch)
treed1f59d395f47320149560bef4278dc0e6a194473 /src/util
parent7f4cdbcbe9b5b4655c2c5eba2043628487668e24 (diff)
downloadminetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.gz
minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.bz2
minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.zip
Clean up getTime helpers
This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/timetaker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/timetaker.cpp b/src/util/timetaker.cpp
index dcf07dc0d..0e92696ac 100644
--- a/src/util/timetaker.cpp
+++ b/src/util/timetaker.cpp
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "timetaker.h"
-#include "../gettime.h"
+#include "../porting.h"
#include "../log.h"
#include <ostream>
@@ -29,14 +29,14 @@ TimeTaker::TimeTaker(const char *name, u32 *result, TimePrecision prec)
m_result = result;
m_running = true;
m_precision = prec;
- m_time1 = getTime(prec);
+ m_time1 = porting::getTime(prec);
}
u32 TimeTaker::stop(bool quiet)
{
if(m_running)
{
- u32 time2 = getTime(m_precision);
+ u32 time2 = porting::getTime(m_precision);
u32 dtime = time2 - m_time1;
if(m_result != NULL)
{
@@ -64,7 +64,7 @@ u32 TimeTaker::stop(bool quiet)
u32 TimeTaker::getTimerTime()
{
- u32 time2 = getTime(m_precision);
+ u32 time2 = porting::getTime(m_precision);
u32 dtime = time2 - m_time1;
return dtime;
}