Is there a way to measure time up to micro seconds using C standard library?

后端 未结 5 737
旧时难觅i
旧时难觅i 2021-01-22 03:33

Is there a platform-independent way to measure time up to micro seconds using C standard library?

5条回答
  •  死守一世寂寞
    2021-01-22 04:27

    time() is standard for practically all C runtime libraries, but has only 1.0 second resolution. In C++ there are the BOOST ptime microsec_clock::universal_time() and ptime microsec_clock::local_time() functions.

提交回复
热议问题