summaryrefslogtreecommitdiff
path: root/src/gettime.h
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/gettime.h
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/gettime.h')
-rw-r--r--src/gettime.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gettime.h b/src/gettime.h
index b2f09a7bb..a93eee387 100644
--- a/src/gettime.h
+++ b/src/gettime.h
@@ -21,33 +21,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define GETTIME_HEADER
#include "irrlichttypes.h"
+#include <time.h>
+#include <string>
-/*
- Get a millisecond counter value.
- Precision depends on implementation.
- Overflows at any value above 10000000.
- Implementation of this is done in:
- Normal build: main.cpp
- Server build: servermain.cpp
-*/
enum TimePrecision
{
- PRECISION_SECONDS = 0,
+ PRECISION_SECONDS,
PRECISION_MILLI,
PRECISION_MICRO,
PRECISION_NANO
};
-extern u32 getTimeMs();
-extern u32 getTime(TimePrecision prec);
-
-/*
- Timestamp stuff
-*/
-
-#include <string>
-#include <time.h>
inline std::string getTimestamp()
{