unsigned char ticks_bits[3] = { 0x0F, 0x31, 0xC3};__uint64_t ( * ticks ) () = (__uint64_t (*) ()) & ticks_bits;__uint64_t T = ticks(); // CRASH!
I have used this code for many years in Windows-32bit to get CPU ticks.But it will crash in Linux 64bit. Is there a way to make it work?