X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/ff4eedb54fbd3d1f757a07681d1318be47512bb2..20ee10ed13aee7d9fb9c844648d5159ed4a054d2:/timer.h diff --git a/timer.h b/timer.h index 52502a1..9f00cd2 100644 --- a/timer.h +++ b/timer.h @@ -31,7 +31,7 @@ struct timespec operator-(const struct timespec& a, const struct timespec& b) class timestamp { public: - enum clock_type { wallclock_time, cpu_time }; + enum class clock_type { WALLCLOCK, CPU }; timestamp(clock_type ct); ~timestamp(); @@ -103,11 +103,11 @@ inline void timestamp::get_time(struct timespec& tv) { switch (clk) { - case cpu_time: { + case clock_type::CPU: { clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tv); break; } - case wallclock_time: + case clock_type::WALLCLOCK: #ifdef CLOCK_MONOTONIC_RAW clock_gettime(CLOCK_MONOTONIC_RAW, &tv); #else