class timestamp {
public:
- enum clock_type { wallclock_time, cpu_time };
+ enum class clock_type { WALLCLOCK, CPU };
timestamp(clock_type ct);
~timestamp();
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