#ifdef __APPLE__
+#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC (1)
+#endif
+#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME (2)
+#endif
#include <sys/time.h>
#include <mach/clock.h>
#include <sys/timeb.h>
struct _timeb t;
_ftime(&t);
- return 1000 * t.time + t.millitm;
+ return 1000 * (uint64_t)t.time + t.millitm;
// NORMAL CODE (use _ftime_s)
//struct _timeb t;