temp code for testing time output

This commit is contained in:
Mitchell Livingston
2008-02-25 23:57:49 +00:00
parent b6856a9f5b
commit c8799f36f3
3 changed files with 5 additions and 4 deletions

View File

@@ -36,7 +36,7 @@
+ (NSString *) stringForRatio: (float) ratio;
+ (NSString *) timeString: (uint64_t) seconds showSeconds: (BOOL) showSeconds;
+ (NSString *) timeString: (uint64_t) seconds showSeconds: (BOOL) showSeconds maxDigits: (NSUInteger) max;
+ (NSString *) timeString: (NSUInteger) seconds showSeconds: (BOOL) showSeconds maxDigits: (NSUInteger) max;
- (NSComparisonResult) compareIP: (NSString *) string;

View File

@@ -104,11 +104,12 @@
+ (NSString *) timeString: (uint64_t) seconds showSeconds: (BOOL) showSeconds
{
return [NSString timeString: seconds showSeconds:showSeconds maxDigits: UINT_MAX];
return [NSString timeString: seconds showSeconds: showSeconds maxDigits: UINT_MAX];
}
+ (NSString *) timeString: (uint64_t) seconds showSeconds: (BOOL) showSeconds maxDigits: (NSUInteger) max
+ (NSString *) timeString: (NSUInteger) seconds showSeconds: (BOOL) showSeconds maxDigits: (NSUInteger) max
{
NSLog(@"seconds: %u max digits: %u", seconds, max);
NSMutableArray * timeArray = [NSMutableArray arrayWithCapacity: MIN(max, 4)];
uint64_t remaining = seconds;

View File

@@ -1113,7 +1113,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
int eta = [self isSeeding] ? [self etaRatio] : [self eta];
return eta >= 0 ? [NSString timeString: eta showSeconds: YES maxDigits: 2]
: NSLocalizedString(@"Unknown", "Torrent -> remaining time");
: NSLocalizedString(@"Unknown", "Torrent -> remaining time");
}
- (NSString *) stateString