/*=========================================================================
Program: vv http://www.creatis.insa-lyon.fr/rio/vv
/*=========================================================================
Program: vv http://www.creatis.insa-lyon.fr/rio/vv
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
QueryPerformanceFrequency((LARGE_INTEGER*)&mFrequency);
#endif
}
//====================================================================
//====================================================================
QueryPerformanceFrequency((LARGE_INTEGER*)&mFrequency);
#endif
}
//====================================================================
//====================================================================
#if defined(unix) || defined(__APPLE__)
getrusage(RUSAGE_SELF, &mBegin);
#if defined(unix) || defined(__APPLE__)
getrusage(RUSAGE_SELF, &mBegin);
//====================================================================
//====================================================================
//====================================================================
//====================================================================
#if defined(unix) || defined (__APPLE__)
getrusage(RUSAGE_SELF, &mEnd);
if (accumulate) {
mElapsed += (mEnd.ru_utime.tv_usec - mBegin.ru_utime.tv_usec)+
#if defined(unix) || defined (__APPLE__)
getrusage(RUSAGE_SELF, &mEnd);
if (accumulate) {
mElapsed += (mEnd.ru_utime.tv_usec - mBegin.ru_utime.tv_usec)+
QueryPerformanceCounter((LARGE_INTEGER*)&mEnd);
if (accumulate) {
mElapsed += ((mEnd-mBegin)*1000000)/(long double)mFrequency;
QueryPerformanceCounter((LARGE_INTEGER*)&mEnd);
if (accumulate) {
mElapsed += ((mEnd-mBegin)*1000000)/(long double)mFrequency;
//====================================================================
//====================================================================
//====================================================================
//====================================================================
if (mNumberOfCall != 1) {
os << "Timer # = " << mNumberOfCall << std::endl;
os << "Timer total = " << mElapsed << " usec \t" << mElapsed/1000000.0 << " sec." << mElapsed/1000000.0/60 << " min."
if (mNumberOfCall != 1) {
os << "Timer # = " << mNumberOfCall << std::endl;
os << "Timer total = " << mElapsed << " usec \t" << mElapsed/1000000.0 << " sec." << mElapsed/1000000.0/60 << " min."
// os << "\tmBegin.ru_utime.tv_sec = " << mBegin.ru_utime.tv_sec << std::endl;
// os << "\tmEnd.ru_utime.tv_sec = " << mEnd.ru_utime.tv_sec << std::endl;
// os << "\tmBegin.ru_utime.tv_usec = " << mBegin.ru_utime.tv_usec << std::endl;
// os << "\tmBegin.ru_utime.tv_sec = " << mBegin.ru_utime.tv_sec << std::endl;
// os << "\tmEnd.ru_utime.tv_sec = " << mEnd.ru_utime.tv_sec << std::endl;
// os << "\tmBegin.ru_utime.tv_usec = " << mBegin.ru_utime.tv_usec << std::endl;
}
//====================================================================
//====================================================================
}
//====================================================================
//====================================================================
//====================================================================
//====================================================================
//====================================================================
//====================================================================