Performance counters on the iPhone

為{幸葍}努か 提交于 2019-12-20 10:44:15

问题


I'm trying to find the best method of incode performance monitoring on the iPhone.

On a windows platform I would use the following functions :

QueryPerformanceCounter((LARGE_INTEGER *)&ctr);
QueryPerformanceFrequency((LARGE_INTEGER *)&freq);

Does anything like this exist on the iPhone? Whats the highest resolution I can time something without using an external tool such as Instruments or Shark?


回答1:


I think mach_absolute_time is what you are looking for. For more information:

  • Technical Q&A QA1398: Mach Absolute Time Units
  • Tutorial: Performance and Time
  • mach_ absolute_ time on the iPhone


来源:https://stackoverflow.com/questions/634144/performance-counters-on-the-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!