C语言时间函数

#include "time.h"  
#include "stdio.h"  
#include "stdlib.h"  
int main()  
{  
    system ("color b2");  
    time_t start,end;  
    start = time(NULL);  
    system("pause");  
    end = time(NULL);  
    printf("The pause used %-.2f seconds.\n",difftime(end,start));//<-  
    system("pause");  
    return 0;  
}  
 

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

 

posted @ 2014-08-10 10:03  商商-77  阅读(118)  评论(0编辑  收藏  举报