Hello, This is a bit off-topic but I can't locate any info on using the IOPMSccheduleEvent call. I basically want to try to wake a sleeping mac a bit before cron is supposed to fire. Here is a program that does *not* work. ******************************************************************** #import <Foundation/Foundation.h> #import <IOKit/pwr_mgt/IOPMLib.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int res; NSDate *now = [NSDate date]; NSDate *plus30Sec = [NSDate dateWithTimeIntervalSinceNow:30]; NSLog(@"\nnow: %@ \nlater: %@", now, plus30Sec); res = IOPMSchedulePowerEvent ((CFDateRef)plus30Sec,NULL, CFSTR(kIOPMAutoWake)); NSLog(@"res=%x",res); [pool release]; return 0; } ******************************************************************* Here is the output 2004-03-18 08:48:22.828 DateStuff[2507] now: <CFDate 0x300da0 [0xa01900e0]>{time = 101310503} later: <CFDate 0x302ef0 [0xa01900e0]>{time = 101310533} 2004-03-18 08:48:22.829 DateStuff[2507] res=e00002d8 DateStuff has exited with status 0. The error code is "not ready" ( Program was run as root ). The error code is the same for all choices of the operation. Is the IOPMScheduleEvent usable from outside the kernel? Thanks for any insight... Jerry _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Jerry LeVan