+- (NSString*)formatTimeInSeconds:(long)seconds {
+ long final = seconds;
+ NSString *finalString;
+ if (final >= 60) {
+ if (final > 3600) {
+ finalString = [NSString stringWithFormat:@"%i:%@:%@",(final / 3600),[self zeroSixty:(int)((final % 3600) / 60)],[self zeroSixty:(int)((final % 3600) % 60)]];
+ } else {
+ finalString = [NSString stringWithFormat:@"%i:%@",(final / 60),[self zeroSixty:(int)(final % 60)]];
+ }
+ } else {
+ finalString = [NSString stringWithFormat:@"0:%@",[self zeroSixty:(int)final]];
+ }
+ return finalString;
+}
+- (NSString*)zeroSixty:(int)seconds {
+ if ( (seconds < 10) && (seconds > 0) ) {
+ return [NSString stringWithFormat:@"0%i",seconds];
+ } else if ( (seconds == 0) ) {
+ return [NSString stringWithFormat:@"00"];
+ } else {
+ return [NSString stringWithFormat:@"%i",seconds];
+ }
+}
+