Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: high accuracy timing options?



At 10:31 PM -0700 3/25/08, Aaron Turner wrote:
I'm trying to implement a high speed (roughly 1usec accuracy) timer
for OS X in C.  My process runs as root and it's perfectly acceptable
that I eat a large amount of CPU time.

There are routines for this in Multiprocessing Services -- if you're trying to measure time:


<http://developer.apple.com/documentation/Carbon/Conceptual/Multitasking_MultiproServ/appendixb/chapter_5_section_1.html>

<http://developer.apple.com/documentation/Hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.19a.html>

If you want to block until a specific time:

<http://developer.apple.com/documentation/Carbon/Reference/Multiprocessing_Services/Reference/reference.html#//apple_ref/c/func/MPDelayUntil>

There are routines at the Mach level as well, but I don't know them off the tip of my head.

HTH,

-Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >high accuracy timing options? (From: "Aaron Turner" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.