Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the equivalent of Windows' QueryPerformanceCounter on OSX?

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?

like image 796
Paolo Avatar asked Jan 21 '09 09:01

Paolo


1 Answers

On OSX mach_absolute_time and mach_timebase_info are the best equivalents to Win32 QueryPerformance* functions.

See http://developer.apple.com/library/mac/#qa/qa1398/_index.html

like image 149
Justicle Avatar answered Oct 02 '22 08:10

Justicle