Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

measure.hpp File Reference

#include <sys/time.h>

Go to the source code of this file.

Defines

#define DBG_START_TIMER
#define DBG_STOP_TIMER(__label__)


Define Documentation

#define DBG_START_TIMER
 

Value:

{ \ struct timeval timeStart; \ struct timeval timeEnd; \ struct timeval timeDiff; \ if(gettimeofday(&timeStart, 0) == -1) \ { \ std::cout << "[DBG-ERR] Failed to get start time." \ << std::endl; \ }

#define DBG_STOP_TIMER __label__   ) 
 

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; \ }


Generated on Tue Sep 21 07:31:09 2004 for VRVis by doxygen 1.3.8