]> AND Private Git Repository - loba.git/blobdiff - timer.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Use git diff instead of diff-index for setlocalversion.
[loba.git] / timer.h
diff --git a/timer.h b/timer.h
index 52502a1f10eca8c23935491fc693acd9b7c5ecaf..9f00cd2be2e993f8b18e448244e37a17e3a089bb 100644 (file)
--- 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