Changeset 103 for trunk/Cocoa/Pester/Source/PSPowerManager.m
- Timestamp:
- 02/26/03 07:12:36 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSPowerManager.m
r61 r103 176 176 } 177 177 178 + (io_service_t)_pmuReference; 179 { 180 io_service_t pmuReference = openPMUComPort(); 181 NSAssert(pmuReference != NULL, NSLocalizedString(@"Couldn't find PMU in IORegistry. This computer may not support automatic wake from sleep.", "Assertion message: couldn't open ApplePMU")); 182 } 183 178 184 + (NSDate *)wakeTime; 179 185 { 180 io_service_t pmuReference = openPMUComPort();186 io_service_t pmuReference = [self _pmuReference]; 181 187 NSNumber *autoWakeTime; 182 188 unsigned long long rawWakeTime; 183 189 184 NSAssert(pmuReference != NULL, @"Couldn’t find PMU in IORegistry. This computer may not support automatic wake from sleep.");185 190 autoWakeTime = (NSNumber *)IORegistryEntryCreateCFProperty(pmuReference, CFSTR("AutoWake"), NULL, 0); 186 191 closePMUComPort(pmuReference); … … 195 200 + (void)setWakeTime:(NSDate *)time; 196 201 { 202 io_service_t pmuReference = [self _pmuReference]; 197 203 unsigned long wakeTime; 198 io_service_t pmuReference = openPMUComPort();199 NSAssert(pmuReference != NULL, @"Couldn’t find PMU in IORegistry. This computer may not support automatic wake from sleep.");200 204 201 205 if (time == nil) wakeTime = 0;
Note:
See TracChangeset
for help on using the changeset viewer.