⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 time.c

📁 排序算法的实现
💻 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 + -