Ignore:
Timestamp:
02/26/03 07:12:36 (21 years ago)
Author:
Nicholas Riley
Message:

Localization, bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSPowerManager.m

    r61 r103  
    176176}
    177177
     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
    178184+ (NSDate *)wakeTime;
    179185{
    180     io_service_t pmuReference = openPMUComPort();
     186    io_service_t pmuReference = [self _pmuReference];
    181187    NSNumber *autoWakeTime;
    182188    unsigned long long rawWakeTime;
    183189   
    184     NSAssert(pmuReference != NULL, @"Couldn’t find PMU in IORegistry. This computer may not support automatic wake from sleep.");
    185190    autoWakeTime = (NSNumber *)IORegistryEntryCreateCFProperty(pmuReference, CFSTR("AutoWake"), NULL, 0);
    186191    closePMUComPort(pmuReference);
     
    195200+ (void)setWakeTime:(NSDate *)time;
    196201{
     202    io_service_t pmuReference = [self _pmuReference];
    197203    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.");
    200204
    201205    if (time == nil) wakeTime = 0;
Note: See TracChangeset for help on using the changeset viewer.