iPhone上的性能计数器 [英] Performance counters on the iPhone

查看:150
本文介绍了iPhone上的性能计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在iPhone上找到最佳的incode性能监控方法。

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

在Windows平台上,我会使用以下功能:

On a windows platform I would use the following functions :

QueryPerformanceCounter((LARGE_INTEGER *)& ctr);

QueryPerformanceFrequency((LARGE_INTEGER *)& freq);

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

iPhone上有这样的东西吗?什么是最高分辨率我可以在不使用仪器或鲨鱼等外部工具的情况下计时?

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?

推荐答案

我认为mach_absolute_time就是你的意思正在找。欲了解更多信息:

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

这篇关于iPhone上的性能计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆