diff -ru MP3Diags-unstable-1.3.04.orig/src/Helpers.cpp MP3Diags-unstable-1.3.04/src/Helpers.cpp --- MP3Diags-unstable-1.3.04.orig/src/Helpers.cpp 2015-05-17 14:13:49.000000000 -0400 +++ MP3Diags-unstable-1.3.04/src/Helpers.cpp 2016-08-13 11:20:47.000000000 -0400 @@ -26,6 +26,14 @@ #include #include +#ifdef __MACH__ + #include + #include + #include + #include + #include +#endif + #include #include @@ -1766,6 +1774,13 @@ LARGE_INTEGER li; QueryPerformanceCounter(&li); return li.QuadPart*m_nDurMul; +#elif defined (__MACH__) + static mach_timebase_info_data_t tb; + if ( tb.denom == 0 ) { + (void) mach_timebase_info(&tb); + } + + return mach_absolute_time() * tb.numer / tb.denom; #else timespec ts; //clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts); // CLOCK_MONOTONIC