C语言中CLK_TCK为何在vs code中显示错误?
#include<stdio.h>
#include<time.h>
void printN(int n);
clock_t start, stop;
double duration;
int main(){
start = clock();
//function
int n = 100;
//scanf("%d",&n);
printN(n);
printf("\n");
//
stop = clock();
duration = ((double)(stop-start))/CLK_TCK;
printf("duration=%lf\n",duration);
return 0;
}
void printN(int n){
if (n)
{
printN(n-1);
printf("%d ",n);
}
}