现在的位置: 首页 > 综合 > 正文

C语言时间函数

2017年12月19日 ⁄ 综合 ⁄ 共 359字 ⁄ 字号 评论关闭

 

  1. #include "time.h"  
  2. #include "stdio.h"  
  3. #include "stdlib.h"  
  4. int main()  
  5. {  
  6.     system ("color b2");  
  7.     time_t start,end;  
  8.     start = time(NULL);  
  9.     system("pause");  
  10.     end = time(NULL);  
  11.     printf("The pause used %-.2f seconds.\n",difftime(end,start));//<-  
  12.     system("pause");  
  13.     return 0;  
  14. }  

 

本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/702547

抱歉!评论已关闭.