// // NSMutableArray_QueueAdditions.m // p4scout // // Created by Work on 1/27/09. // Copyright 2009 Perforce Software, Inc. All rights reserved. // #import "NSStringAdditions.h" @implementation NSString (NSStringAdditions) +(NSString*)coarseStringWithTimeInterval:(NSTimeInterval)timeInterval { int seconds = timeInterval; if ( seconds < 60 ) // < minute { return [NSString stringWithFormat:@"%d seconds", seconds]; } else if ( seconds < 60*60 ) // < hour { return [NSString stringWithFormat:@"%d minutes", (seconds/60)]; } else if ( seconds < 60*60*24 ) // < day { return [NSString stringWithFormat:@"%d hours", (seconds/(60*60))]; } return [NSString stringWithFormat:@"%d days", (seconds/(60*60*24))]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |