Value: if(gettimeofday(&timeEnd, 0) == -1) \
{ \
std::cout << "[DBG-ERR] Failed to get end time." \
<< std::endl; \
} \
timeDiff.tv_sec = timeEnd.tv_sec - timeStart.tv_sec; \
timeDiff.tv_usec = timeEnd.tv_usec - timeStart.tv_usec; \
if (timeDiff.tv_usec < 0) \
{ \
--timeDiff.tv_sec; \
timeDiff.tv_usec += 1000000; \
} \
std::cout << "[DBG] Time measurement '" << (__label__) << "':\t" \
<< timeDiff.tv_sec << " secs, " \
<< timeDiff.tv_usec << " usecs." << std::endl; \
}
|