Disabling screen saver
28/01/06 23:04
How to simulate user activity so that screen saver or energy saver doen't stop a length background task without user activity ?
#import
- (void)awakeFromNib
{
fTimer = [NSTimer scheduledTimerWithTimeInterval:30
target:self
selector:@selector(dummyActivityTimer:)
userInfo:nil
repeats:YES];
...
}
- (void) dummyActivityTimer:(NSTimer *)timer
{
OSErr err = UpdateSystemActivity(UsrActivity); // in Power.h
...
}
- (void)awakeFromNib
{
fTimer = [NSTimer scheduledTimerWithTimeInterval:30
target:self
selector:@selector(dummyActivityTimer:)
userInfo:nil
repeats:YES];
...
}
- (void) dummyActivityTimer:(NSTimer *)timer
{
OSErr err = UpdateSystemActivity(UsrActivity); // in Power.h
...
}