14 #include <sys/resource.h>
46 if (0 != getrusage(RUSAGE_CHILDREN, &theUsage)) {
49 startCPUTime_.tv_sec = theUsage.ru_stime.tv_sec + theUsage.ru_utime.tv_sec;
50 startCPUTime_.tv_usec = theUsage.ru_stime.tv_usec + theUsage.ru_utime.tv_usec;
72 double const microsecToSec = 1E-6;
75 if (0 != getrusage(RUSAGE_CHILDREN, &theUsage)) {
79 returnValue = theUsage.ru_stime.tv_sec + theUsage.ru_utime.tv_sec -
startCPUTime_.tv_sec +
80 microsecToSec * (theUsage.ru_stime.tv_usec + theUsage.ru_utime.tv_usec -
startCPUTime_.tv_usec);
double calculateDeltaTime() const
enum edm::ChildrenCPUTimer::State state_
double accumulatedCPUTime_
struct timeval startCPUTime_