site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Hi, I am a developer at The MathWorks working on improving the precision and accuracy of our tic/toc functions in the MATLAB language. These functions are used for measuring elapsed wallclock time for for one or more operations in the MATLAB language. I am planning to use the following API to do elapsed timing: mach_absolute_time() mach_timebase_info() I have confirmed in my code so far that indeed on G5 desktops the update frequency is about 33MHz, and appears to be fixed. I have been looking at the Timer Facilities (Chapter 8) in Book E: Enhanced PowerPC Architecture published by IBM which is very interesting. Can anyone answer the following questions? 1. What clock mechanism (hardware/software) is driving the update of that register for Apple systems? What/who makes the decision that say on a G5 it is 33 MHz? 2. Is the update frequency constant on all Apple systems, or can it vary? We got burned recently on the Pentium M processor on Windows trying to use the CPU cycle counter. It is clearly not constant for those systems. Fortunately, Microsoft does provide an API that handles this problem. Are we going to run into a problem on say some Apple laptops where that interface above will not work? Any help which be much appreciated. Sincerely, Martin Knapp-Cordes --------------------------------------------------------------- | Martin Knapp-Cordes martin@mathworks.com | | The MathWorks, Inc. http://www.mathworks.com | | 3 Apple Hill Drive Natick, MA 01760 | | Tel: (508) 647-7321 Fax: (508) 647-7015 | --------------------------------------------------------------- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com