diff --git a/Control/PerformanceMonitoring/PerfMonComps/PerfMonComps/PerfMonMTUtils.h b/Control/PerformanceMonitoring/PerfMonComps/PerfMonComps/PerfMonMTUtils.h index a2b8991cf9d3d4f53dd86a68d9b33a8ae0c3adbe..7ab237bc9ba2767376c3b96d3e4b1f04a2f58a81 100644 --- a/Control/PerformanceMonitoring/PerfMonComps/PerfMonComps/PerfMonMTUtils.h +++ b/Control/PerformanceMonitoring/PerfMonComps/PerfMonComps/PerfMonMTUtils.h @@ -10,9 +10,10 @@ #include <time.h> #include <ctime> -// Necessary tools +/* + * Necessary tools + */ namespace PMonMT { - // Base methods for collecting data double get_thread_cpu_time(); double get_process_cpu_time(); @@ -25,12 +26,12 @@ namespace PMonMT { } Measurement() : cpu_time(-1) { } }; - } -// Thread specific CPU time measurements +/* + * Thread specific CPU time measurements + */ inline double PMonMT::get_thread_cpu_time() { - // Get the thread clock id clockid_t thread_cid; pthread_getcpuclockid(pthread_self(),&thread_cid); @@ -43,7 +44,9 @@ inline double PMonMT::get_thread_cpu_time() { return double(ctime.tv_sec*1.e3 + ctime.tv_nsec*1.e-6); } -// Process specific CPU time measurements +/* + * Process specific CPU time measurements + */ inline double PMonMT::get_process_cpu_time() { // Simply return process CPU-time [precision is seconds here] return std::clock()/CLOCKS_PER_SEC*1.e3;