📄 time.c
字号:
#include<stdlib.h>
#include<stdio.h>
float timeclock(void (*fun)(),float *p,long m)
{ clock_t start,end;
float during;
start=clock();
(*(fun))(p,m);
end=clock();
during=(float)(end-start)/CLOCKS_PER_SEC;
/* showres(p,N);
printf("\n");*/
printf("\nthe time :");
printf( "%f seconds\n",during);
return during;
}
float timeclock1(void (*fun)(),float *p,long n,long m)
{ clock_t start,end;
float during;
start=clock();
(*(fun))(p,n,m);
end=clock();
during=(float)(end-start)/CLOCKS_PER_SEC;
/*showres(p,N);
printf("\n");*/
printf("\nthe time :");
printf( "%f seconds\n",during);
return during;
}
float timeclock3(void (*fun)(),float *p,float *p1,long n,long m)
{ clock_t start,end;
float during;
start=clock();
(*(fun))(p,p1,n,m);
end=clock();
during=(float)(end-start)/CLOCKS_PER_SEC;
/* showres(p,N);
printf("\n");*/
printf("\nthe time :");
printf( "%f seconds\n",during);
return during;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -