Time stamp in the C programming language

后端 未结 9 1435
别那么骄傲
别那么骄傲 2020-12-08 04:48

How do I stamp two times t1 and t2 and get the difference in milliseconds in C?

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 05:39

    Also making aware of interactions between clock() and usleep(). usleep() suspends the program, and clock() only measures the time the program is running.

    If might be better off to use gettimeofday() as mentioned here

提交回复
热议问题