Changeset 348 for trunk/Cocoa/AntiRSI


Ignore:
Timestamp:
11/05/07 10:48:26 (17 years ago)
Author:
Nicholas Riley
Message:

AntiRSI.xcodeproj: Explicitly use 10.4 Universal SDK for building on Leopard.

AntiRSI.m: Consistently use rounding instead of truncation for display: fixes times ordered 3:01, 2:00, 2:59, etc. Thanks to Andy Reitz for pointing this out.

Location:
trunk/Cocoa/AntiRSI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/AntiRSI/AntiRSI.m

    r346 r348  
    598598- (NSString *)sessionTimeString;
    599599{
    600     return [NSString stringWithFormat:@"Session: %d:%02d:%02d", (int)session_t / 3600,
    601             ((int)session_t / 60) % 60, lrint(session_t) % 60];
     600    int seconds = lrint(session_t);
     601    return [NSString stringWithFormat:@"Session: %d:%02d:%02d", seconds / 3600,
     602            (seconds / 60) % 60, seconds % 60];
    602603}
    603604
     
    608609   
    609610    // time left
    610     double timeLeft = duration - progress_t;
    611     [time setStringValue:[NSString stringWithFormat:@"%d:%02d", (int)timeLeft / 60, lrint(timeLeft) % 60]];
     611    int timeLeft = lrint(duration - progress_t);
     612    [time setStringValue:[NSString stringWithFormat:@"%d:%02d", timeLeft / 60, timeLeft % 60]];
    612613   
    613614    // cumulative typing time in this session (e.g. today)
  • trunk/Cocoa/AntiRSI/AntiRSI.xcodeproj/project.pbxproj

    r346 r348  
    394394                                GCC_C_LANGUAGE_STANDARD = c99;
    395395                                PREBINDING = NO;
     396                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
    396397                        };
    397398                        name = Development;
     
    406407                                GCC_C_LANGUAGE_STANDARD = c99;
    407408                                PREBINDING = NO;
     409                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
    408410                        };
    409411                        name = Deployment;
     
    414416                                GCC_C_LANGUAGE_STANDARD = c99;
    415417                                PREBINDING = NO;
     418                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
    416419                        };
    417420                        name = Default;
Note: See TracChangeset for help on using the changeset viewer.