summaryrefslogtreecommitdiff
path: root/src/porting.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/porting.h')
-rw-r--r--src/porting.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/porting.h b/src/porting.h
index 4e663390a..304e4aff0 100644
--- a/src/porting.h
+++ b/src/porting.h
@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define sleep_ms(x) Sleep(x)
#else
#include <unistd.h>
- #include <stdint.h> //for uintptr_t
+ #include <cstdint> //for uintptr_t
// Use standard Posix macro for Linux
#if (defined(linux) || defined(__linux)) && !defined(__linux__)
@@ -112,8 +112,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef _WIN32 // Posix
#include <sys/time.h>
- #include <time.h>
- #if defined(__MACH__) && defined(__APPLE__)
+ #include <ctime>
+
+#if defined(__MACH__) && defined(__APPLE__)
#include <mach/clock.h>
#include <mach/mach.h>
#endif
@@ -273,9 +274,9 @@ inline u64 getDeltaMs(u64 old_time_ms, u64 new_time_ms)
{
if (new_time_ms >= old_time_ms) {
return (new_time_ms - old_time_ms);
- } else {
- return (old_time_ms - new_time_ms);
}
+
+ return (old_time_ms - new_time_ms);
}
inline const char *getPlatformName()