mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
temp code for testing time output
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user