• 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
AbsoluteTime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AbsoluteTime


  • Subject: AbsoluteTime
  • From: email@hidden
  • Date: Mon, 6 Feb 2006 22:51:09 -0800

I'm updating a USB kext to be universal.
I've done that and it appears to work. 
(Can't fully test because I haven't updated the applications which use it and they give a Rosetta failure notice when trying to talk to IOUserClient)
Anyways, I am trying to compile the driver so that it works on version 10.2.8 or later. I've already set up xcode for this thanks to a great TN on the subject. The problem I'm having is dealing with 
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
On 10.3 and earlier at is defined as AbosoluteTime equiv to UnsignedWide struct.
On 10.4 this has changed to uint64_t  (Not very nice to change it like this, even if uint64_t is a better idea.)
I need a macro which will compensate for the correct OS X version being compile during the universal double compile sequence.
This does not work as MAC_OS_X_VERSION does not appear to be defined.
#if MAC_OS_X_VERSION < MAC_OS_X_VERSION_10_4
AbsoluteTime at;
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
#else
uint64_t at;
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
#endif

Does anyone know the correct macro to use?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AbsoluteTime
      • From: William Rector <email@hidden>
    • Re: AbsoluteTime
      • From: Eric Welch <email@hidden>
  • Prev by Date: Re: Link errors
  • Next by Date: OT - Any tools for Object Persistence
  • Previous by thread: Re: Link errors
  • Next by thread: Re: AbsoluteTime
  • Index(es):
    • Date
    • Thread