Generation

generate functionWed, 07 Jun 2023

获取x86机器的定时器计数值,换算成纳秒并打印

#include <stdio.h> #include <time.h> int main() { unsigned long long int x; asm("rdtsc" : "=A" (x)); printf("%llu\n", x); return 0; }

Want to kickstart your project?Use the new AI Studio to create your code