C - gettimeofday for computing time?

前端 未结 5 1879
闹比i
闹比i 2020-12-08 05:13

do you know how to use gettimeofday for measuring computing time? I can measure one time by this code:

  char buffer[30];
  struct timeval tv;

  time_t curt         


        
5条回答
  •  鱼传尺愫
    2020-12-08 05:28

    No. gettimeofday should NEVER be used to measure time.

    This is causing bugs all over the place. Please don't add more bugs.

提交回复
热议问题