• 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
Re: Wakeup/Sleep?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wakeup/Sleep?


  • Subject: Re: Wakeup/Sleep?
  • From: Nicko van Someren <email@hidden>
  • Date: Wed, 17 Mar 2004 20:47:05 +0000

On 17 Mar 2004, at 18:45, Jerry LeVan wrote:

I am trying to figure out how to sleep/wake the machine...
Here is some code that does not work.
...
NSCalendarDate *plus30Sec = [now dateByAddingYears:0 months:0
days:0 hours:0 minutes:0 seconds:30];
...
res = IOPMSchedulePowerEvent ((CFDateRef)plus30Sec,NULL, CFSTR(kIOPMAutoSleep));

I see no indication in the documentation for NSCalendarDate that it is toll-free bridged to CFDateRef. Have you tried passing to IOPMSchedulePowerEvent() the type of date that the documentation suggests?

Nicko
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Wakeup/Sleep?
      • From: Jerry LeVan <email@hidden>
References: 
 >Wakeup/Sleep? (From: Jerry LeVan <email@hidden>)

  • Prev by Date: Validating User Interface Items
  • Next by Date: Re: Wakeup/Sleep?
  • Previous by thread: Wakeup/Sleep?
  • Next by thread: Re: Wakeup/Sleep?
  • Index(es):
    • Date
    • Thread