nuclear@69: #ifndef _MSC_VER nuclear@38: #include nuclear@38: #include "timer.h" nuclear@38: nuclear@38: using namespace std::chrono; nuclear@38: nuclear@38: static bool timer_initialized; nuclear@38: static time_point start_time; nuclear@38: nuclear@38: unsigned long get_time_msec(void) nuclear@38: { nuclear@38: if(!timer_initialized) { nuclear@38: start_time = steady_clock::now(); nuclear@38: timer_initialized = true; nuclear@38: } nuclear@38: nuclear@38: auto dur = steady_clock::now() - start_time; nuclear@38: return duration_cast(dur).count(); nuclear@38: } nuclear@69: #else nuclear@69: #include nuclear@69: nuclear@69: unsigned long get_time_msec(void) nuclear@69: { nuclear@69: return GetTickCount(); nuclear@69: } nuclear@69: #endif