什么是对OSX Windows的QueryPerformanceCounter的等价? [英] What's the equivalent of Windows' QueryPerformanceCounter on OSX?
问题描述
我从Windows移植库,* NIX(目前OSX),没有任何人现在是什么功能,我可以用微软的QueryPerformanceCounter和QueryPerformanceFrequency的不是?
I'm porting a library from Windows to *NIX (currently OSX), does anyone now what function can I use instead of Microsoft's QueryPerformanceCounter and QueryPerformanceFrequency?
推荐答案
<一个href=\"http://www.tin.org/bin/man.cgi?section=3&topic=clock_gettime\">http://www.tin.org/bin/man.cgi?section=3&topic=clock_gettime
(以及其他功能有提到的)
- 这是Posix的!将回退到柜台更糟如果HPET不存在。 (不应该是一个问题,虽然)
http://www.tin.org/bin/man.cgi?section=3&topic=clock_gettime (and the other functions mentioned there) - it's Posix! Will fall back to worse counters if HPET is not existent. (shouldn't be a problem though)
<一个href=\"http://en.wikipedia.org/wiki/High_$p$pcision_Event_Timer\">http://en.wikipedia.org/wiki/High_$p$pcision_Event_Timer
分辨率应为+ 10MHz的。
Resolution should be about +10Mhz.
这篇关于什么是对OSX Windows的QueryPerformanceCounter的等价?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!