Is cpu clock time returned by have to be exactly same among runs?

后端 未结 3 667
再見小時候
再見小時候 2020-12-11 03:08

I have big project written in C++. It might have some stability problems (i.e. random runtime), but I\'m not sure about it. I understand that execution time, measured by wal

3条回答
  •  自闭症患者
    2020-12-11 03:22

    OP says is using Windows 7, if that is MSVC the man page says

    The clock function tells how much wall-clock time the calling process has used. Note that this is not strictly conformant with ISO C99, which specifies net CPU time as the return value. To obtain CPU time, use the Win32 GetProcessTimes function.

    That is why the apparent execution time is inconsistent.

提交回复
热议问题