How can I get the execution time of a program in milliseconds in C?

后端 未结 6 1018
清酒与你
清酒与你 2020-12-30 09:28

Currently I\'m getting the execution wall time of my program in seconds by calling:

time_t startTime = time(NULL);
//section of code
time_t         


        
6条回答
  •  温柔的废话
    2020-12-30 10:03

    If you can do this outside of the program itself, in linux, you can use time command (time ./my_program).

提交回复
热议问题