some more insignificant changes I have sitting around locally

This commit is contained in:
Mitchell Livingston
2009-12-31 03:19:54 +00:00
parent 6529a78c9b
commit f2bbae3fd8
7 changed files with 40 additions and 36 deletions

View File

@@ -122,10 +122,12 @@
+ (NSString *) timeString: (uint64_t) seconds showSeconds: (BOOL) showSeconds maxFields: (NSUInteger) max
{
NSAssert(max > 0, @"Cannot generate a time string with no fields");
NSMutableArray * timeArray = [NSMutableArray arrayWithCapacity: MIN(max, 4)];
NSUInteger remaining = seconds; //causes problems for some users when it's a uint64_t
if (max > 0 && seconds >= (24 * 60 * 60))
if (seconds >= (24 * 60 * 60))
{
const NSUInteger days = remaining / (24 * 60 * 60);
if (days == 1)