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

C语言精确获得消耗时间

2017年09月17日 ⁄ 综合 ⁄ 共 168字 ⁄ 字号 评论关闭

    1. #include<stdlib.h>    
    2. #include<time.h>      
    3. int main()    
    4. {    
    5.    time_t tBegin;    
    6.    tBegin=clock();    
    7.    //代码段      
    8.   time_t tCost=clock()-tBegin;  
    9.    return 0;  
    10. }  

     

抱歉!评论已关闭.