-double approx_CPU_MHz(unsigned sleepTime) {
- using namespace std::chrono_literals;
- uint32_t aux = 0;
- uint64_t cycles_start = rdtscp(aux);
- double time_start = age();
- std::this_thread::sleep_for(sleepTime * 1ms);
- uint64_t elapsed_cycles = rdtscp(aux) - cycles_start;
- double elapsed_time = age() - time_start;
- return elapsed_cycles / elapsed_time;
-}
+// If model name in "/proc/cpuinfo" is happens to be "Common KVM processor" then
+// approx_CPU_MHz() results in "SIGILL - Illegal Instruction" signal.
+//
+// double approx_CPU_MHz(unsigned sleepTime) {
+// using namespace std::chrono_literals;
+// uint32_t aux = 0;
+// uint64_t cycles_start = rdtscp(aux);
+// double time_start = age();
+// std::this_thread::sleep_for(sleepTime * 1ms);
+// uint64_t elapsed_cycles = rdtscp(aux) - cycles_start;
+// double elapsed_time = age() - time_start;
+// return elapsed_cycles / elapsed_time;
+//}