我正在尝试使用 time.h 库在 c 中查找 memmove 函数所花费的时间。但是,当我执行代码时,我得到的值为零。找到 memmove 函数所用时间的任何可能的解决方案?
void main(){
uint64_t start,end;
uint8_t a,b;
char source[5000];
char dest[5000];
uint64_t j=0;
for(j=0;j<5000;j++){
source[j]=j;
}
start=clock();
memmove(dest,source,5000);
end=clock();
printf("%f",((double)end-start));
}