GetLocalTime() API time resolution

前端 未结 4 835
臣服心动
臣服心动 2021-01-12 10:06

I need to find out time taken by a function in my application. Application is a MS VIsual Studio 2005 solution, all C code.

I used thw windows API GetLocalTime(SYST

4条回答
  •  失恋的感觉
    2021-01-12 10:07

    One caution on multiprocessor systems:

    from http://msdn.microsoft.com/en-us/library/ms644904(VS.85).aspx

    On a multiprocessor computer, it should not matter which processor is called. However, you can get different results on different processors due to bugs in the basic input/output system (BIOS) or the hardware abstraction layer (HAL). To specify processor affinity for a thread, use the SetThreadAffinityMask function.

    Al Weiner

提交回复
热议问题