Easily measure elapsed time

前端 未结 26 2826
栀梦
栀梦 2020-11-22 04:13

I am trying to use time() to measure various points of my program.

What I don\'t understand is why the values in the before and after are the same? I understand thi

26条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 05:12

    The values printed by your second program are seconds, and microseconds.

    0 26339 = 0.026'339 s =   26339 µs
    4 45025 = 4.045'025 s = 4045025 µs
    

提交回复
热议问题