• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Probably solved: Equivalent to gethrtime()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Probably solved: Equivalent to gethrtime()


  • Subject: Probably solved: Equivalent to gethrtime()
  • From: Malte Tancred <email@hidden>
  • Date: Fri, 7 Dec 2001 10:18:38 +0100

Thank you Brendan, and everyone else for your swift answers.

If mach_absolute_time() is in fact a fixed clock cycle counter this
will solve my problem. I've patched the program I was trying to
compile and it seems works now.

Next I'll have to test the functionallity to assert that it actually
works.

I'll report my findings in a couple of months. The program is keeping
the system clock 'synced' by compensating for a constantly fast or
slow processor clock. I'll have to run the program on a computer for
some time to see if it succeeds in its efforts.

Again, thanks and cheerio,
Malte

Brendan Younger:

On Wednesday, November 28, 2001, at 09:04 AM, Malte Tancred wrote:

Is there a Mac OS X equivalent to the gethrtime() nanosecond counter
found on Solaris?

>From the Mac OS X 10.1 Release Notes:

IMPORTANT:
Processes requiring high resolution processor based timing information should use the one of the high level abstractions provided by Mac OS X such as mach_absolute_time or UPTime and should never attempt to access the hardware directly.

Check out /usr/include/mach/mach_time.h and clock.h in the Kernel.framework.

Brendan Younger



--
Malte Tancred
Computer programmer, Oops AB, Sweden
mailto:email@hidden
http://www.oops.se/


  • Prev by Date: Re: Drag and drop onto the desktop?
  • Next by Date: Weird deallocation of custom cell class
  • Previous by thread: Re: difficulties with NSCell -setImage method
  • Next by thread: Weird deallocation of custom cell class
  • Index(es):
    • Date
    • Thread