High-Performance Timer vs StopWatch

前端 未结 3 950
清酒与你
清酒与你 2020-12-15 16:02

Does anyone know if the HiPerfTimer or the StopWatch class is better for benchmarking, and why?

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 17:01

    StopWatch- it also works on systems that don't support a high resolution performance counter and you don't need any external libraries to use it.

    The other one throws an Win32Exception if there is no support for a high resolution counter.

提交回复
热议问题