How to calculate the execution time in C?

后端 未结 4 1264
自闭症患者
自闭症患者 2021-01-27 09:38

How can I calculate the execution time in the following code:

#include   /* Core input/output operations                         */
#include 

        
4条回答
  •  闹比i
    闹比i (楼主)
    2021-01-27 10:24

    Because you don't have adequate format strings for them, you need something starting with a '%', like:

    printf("    Time   :%d \n", clock() );
    

提交回复
热议问题