节拍数计时程序示例
1.
#include<stdio.h>
#include<unistd.h> //sleep
unsigned long rpcc()
{
unsigned long result;
unsigned hi,lo;
asm volatile("rdtsc":"=a"(lo),"=d"(hi));
result = ((unsigned long long)lo)|(((unsigned long long)hi)<<32);
r...
原创
2020-08-24 20:53:48 ·
677 阅读 ·
0 评论