using ABS is better than multiplying by -1

This commit is contained in:
Mitchell Livingston 2010-01-17 16:20:28 +00:00
parent 45933314c5
commit 4ea2557fed
1 changed files with 3 additions and 2 deletions

View File

@ -1449,7 +1449,7 @@ int trashDataFile(const char * filename)
- (NSInteger) stalledMinutes
{
time_t start = fStat->startDate;
const time_t start = fStat->startDate;
if (start == 0)
return -1;
@ -1457,7 +1457,8 @@ int trashDataFile(const char * filename)
* activity = [self dateActivity];
NSDate * laterDate = activity ? [started laterDate: activity] : started;
return -1 * [laterDate timeIntervalSinceNow] / 60;
return ABS([laterDate timeIntervalSinceNow]) / 60;
}
- (BOOL) isStalled