Loading src/core/tnlTimerCPU.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -26,15 +26,9 @@ tnlTimerCPU :: tnlTimerCPU() void tnlTimerCPU::reset() { #ifdef HAVE_SYS_RESOURCE_H rusage init_usage; getrusage( RUSAGE_SELF, &init_usage ); initial_time = init_usage. ru_utime. tv_sec + 1.0e-6 * ( double ) init_usage. ru_utime. tv_usec; #else initial_time = 0; #endif total_time = 0.0; stop_state = false; stop_state = true; } void tnlTimerCPU::stop() Loading Loading @@ -63,8 +57,10 @@ void tnlTimerCPU::start() double tnlTimerCPU::getTime( int root, MPI_Comm comm ) { #ifdef HAVE_SYS_RESOURCE_H if( ! stop_state ) { stop(); start(); } double mpi_total_time; MPIReduce( total_time, mpi_total_time, 1, MPI_SUM, root, comm ); return mpi_total_time; Loading Loading
src/core/tnlTimerCPU.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -26,15 +26,9 @@ tnlTimerCPU :: tnlTimerCPU() void tnlTimerCPU::reset() { #ifdef HAVE_SYS_RESOURCE_H rusage init_usage; getrusage( RUSAGE_SELF, &init_usage ); initial_time = init_usage. ru_utime. tv_sec + 1.0e-6 * ( double ) init_usage. ru_utime. tv_usec; #else initial_time = 0; #endif total_time = 0.0; stop_state = false; stop_state = true; } void tnlTimerCPU::stop() Loading Loading @@ -63,8 +57,10 @@ void tnlTimerCPU::start() double tnlTimerCPU::getTime( int root, MPI_Comm comm ) { #ifdef HAVE_SYS_RESOURCE_H if( ! stop_state ) { stop(); start(); } double mpi_total_time; MPIReduce( total_time, mpi_total_time, 1, MPI_SUM, root, comm ); return mpi_total_time; Loading