X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkTimer.cxx;h=89297f3088ae88f1511cd231ca2026ac0d856a6b;hb=e0bfd8dc8b4063f757b7f3858d7c1efeadc17561;hp=7892cb62768f5c43e40335d6f0ab63e1a2155916;hpb=0b7c9b1e1215634b02cbd38d4e4ba101d6111ba8;p=clitk.git diff --git a/common/clitkTimer.cxx b/common/clitkTimer.cxx index 7892cb6..89297f3 100644 --- a/common/clitkTimer.cxx +++ b/common/clitkTimer.cxx @@ -44,7 +44,7 @@ clitk::Timer::Timer() { //==================================================================== void clitk::Timer::Start() { -#if defined(unix) +#if defined(unix) || defined(__APPLE__) getrusage(RUSAGE_SELF, &mBegin); #elif defined(WIN32) QueryPerformanceCounter((LARGE_INTEGER*)&mBegin); @@ -55,7 +55,7 @@ void clitk::Timer::Start() { //==================================================================== void clitk::Timer::Stop(bool accumulate) { -#if defined(unix) +#if defined(unix) || defined (__APPLE__) getrusage(RUSAGE_SELF, &mEnd); if (accumulate) { mElapsed += (mEnd.ru_utime.tv_usec - mBegin.ru_utime.tv_usec)+