Display a negative time in Obj-C - ios

It may sound simple however I am unsure how to do this. How do I display time in the following format?:
-00:00:00
I have tried using float and int values of the interval difference between two times however neither give a consistent display in the 00:00:00 format. I have also tried converting the time difference into date and then display as String.
This is the code I have used to convert my intervals :
NSDate * now = [NSDate date];
NSTimeInterval totalTime1 = [now timeIntervalSinceDate: timeEntry1];
NSTimeInterval totalTime2 = [now timeIntervalSinceDate: timeEntry2];
//must always be this way
int adjustedTime = totalTime1 - totalTime2;
int hours = adjustedTime / 3600;
int minutes = (adjustedTime / 60) % 60;
int seconds = adjustedTime % 60;
NSString * newTime = [NSString stringWithFormat:#"%02u:%02u:%02u", hours, minutes, seconds];
The above works fine for displaying positive time differences. However presents a variety of 00:423456:978098 and so on when it goes negative in both the NSLog and the Label.
When I convert and save as a type of NSDate I get (null) in NSLog and nothing in my Label.
When I use float it works but does not consistently display in the 00:00:00 format.
NOTE
The code I am using works immaculately for positive time differences. I need negative time differences to also display.
I also need to be able to save the negative time to CoreData. If this is not possible then I will work around, but displaying negative time formatted correctly is the main issue.
EDIT
My new revised code:
NSDate * now = [NSDate date];
NSTimeInterval totalTime1 = [now timeIntervalSinceDate: timeEntry1];
NSTimeInterval totalTime2 = [now timeIntervalSinceDate: timeEntry2];
//must always be this way
int adjustedTime = (int) (totalTime1 - totalTime2);
NSLog (#"What is the adjustedTime? %d", adjustedTime);
int hours = adjustedTime / 3600;
int minutes = (adjustedTime / 60) % 60;
int seconds = adjustedTime % 60;
NSString * newTime = [NSString stringWithFormat:#"%#%02d:%02d:%02d", adjustedTime < 0 ?#"-":#"", hours, minutes, seconds];
NSLog(#"What is the newTime? %#", newTime);
It is closer as now it displays negative numbers however the display is still incorrect when negative.
EDIT 2
A person who answered below suggested I try checking for negative if it is a boolean. Displaying did not change. Below are more log statements to demonstrate. NOTE I stopped using an updated seconds for sake of working out whether it affected the display and stored seconds separate to test, which is why there is no - sign or alteration to the seconds.
2015-01-09 09:30:14.526 App2.0[8398:498707] What is time 2 : 720
2015-01-09 09:30:14.526 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:14.526 App2.0[8398:498707] What is the adjusted time? 51
2015-01-09 09:30:14.527 App2.0[8398:498707] New Time: 00:00:51
2015-01-09 09:30:18.249 App2.0[8398:498707] What is time 2 : 900
2015-01-09 09:30:18.249 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:18.249 App2.0[8398:498707] What is the adjusted time? -129
2015-01-09 09:30:18.249 App2.0[8398:498707] New Time: -00:-2:51
2015-01-09 09:30:20.281 App2.0[8398:498707] What is time 2 : 840
2015-01-09 09:30:20.281 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:20.281 App2.0[8398:498707] What is the adjusted time? -69
2015-01-09 09:30:20.281 App2.0[8398:498707] New Time: -00:-1:51
2015-01-09 09:30:21.725 App2.0[8398:498707] What is time 2 : 780
2015-01-09 09:30:21.726 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:21.726 App2.0[8398:498707] What is the adjusted time? -9
2015-01-09 09:30:21.726 App2.0[8398:498707] New Time: -00:00:51
2015-01-09 09:30:30.161 App2.0[8398:498707] What is time 2 : 1080
2015-01-09 09:30:30.161 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:30.162 App2.0[8398:498707] What is the adjusted time? -309
2015-01-09 09:30:30.162 App2.0[8398:498707] New Time: -00:-5:51
2015-01-09 09:30:33.389 App2.0[8398:498707] What is time 2 : 4680
2015-01-09 09:30:33.389 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:33.390 App2.0[8398:498707] What is the adjusted time? -3909
2015-01-09 09:30:33.390 App2.0[8398:498707] New Time: --1:-5:51
2015-01-09 09:30:36.186 App2.0[8398:498707] What is time 2 : 8280
2015-01-09 09:30:36.187 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:36.187 App2.0[8398:498707] What is the adjusted time? -7509
2015-01-09 09:30:36.187 App2.0[8398:498707] New Time: --2:-5:51
2015-01-09 09:30:43.918 App2.0[8398:498707] What is time 2 : 660
2015-01-09 09:30:43.918 App2.0[8398:498707] What is time 1 : 771
2015-01-09 09:30:43.919 App2.0[8398:498707] What is the adjusted time? 111
2015-01-09 09:30:43.919 App2.0[8398:498707] New Time: 00:01:51

Since you're displaying the time components separately, you'll probably need some conditional logic to adjust the display depending on whether totalTime2 is before or after totalTime1
:
NSString *newTime = nil;
if (adjustedTime < 0) {
newTime = [NSString stringWithFormat:#"-%02d:%02d:%02d", hours, minutes, seconds];
}
else {
newTime = [NSString stringWithFormat:#"%02d:%02d:%02d", hours, minutes, seconds];
}
or if you prefer something more compact:
NSString *newTime = adjustedTime < 0 ? #"-" : #"";
newTime = [newTime stringByAppendingFormat:#"%02d:%02d:%02d", hours, minutes, seconds];
Also, as Wain points out in the comments, you'll need to take the absolute value of each component before using it to display:
int hours = abs(adjustedTime / 3600);
int minutes = abs((adjustedTime / 60) % 60);
int seconds = abs(adjustedTime % 60);

That should do the trick:
NSDate *now = [NSDate date];
NSTimeInterval totalTime1 = [now timeIntervalSinceDate: timeEntry1];
NSTimeInterval totalTime2 = [now timeIntervalSinceDate: timeEntry2];
NSLog(#"totalTime1: %f", totalTime1); // => -60.00;
NSLog(#"totalTime2: %f", totalTime2); // => 6023.00;
//must always be this way
int timeOffset = (int) (totalTime1 - totalTime2);
NSLog(#"timeOffset: %d", timeOffset); // => -6083;
BOOL showNegativePrefix = timeOffset < 0;
int hours = abs(timeOffset / 3600); // => 01
int minutes = abs((timeOffset / 60 ) % 60); // => 41
int seconds = abs(timeOffset % 60); // => 23
NSString * newTime = [NSString stringWithFormat:#"%#%02d:%02d:%02d", showNegativePrefix ? #"-" : #"", hours, minutes, seconds];
NSLog(#"%#", newTime); // => -01:41:23

You are almost there, all you need extra is a flag if the value is negative and to then format the positive difference preceded by a sign if needed. First set a flag and make the difference always positive:
int adjustedTime = ...;
BOOL isNeg;
if (adjustedTime < 0)
{
isNeg = YES;
adjustedTime = -adjustedTime; // make value +ve
}
else
isNeg = NO;
then do your math as before and change the format line to:
NSString *newTime = [NSString stringWithFormat:#"%#%02d:%02d:%02d", (isNeg ? #"-" : #""), hours, minutes, seconds];
Note: you need to use %d as your values are int not unsigned int.
HTH
Addendum
Here is the code again, including the bit of yours I skipped ("do your math as before"), with added comments:
int adjustedTime = totalTime1 - totalTime2;
// At this point adjustedTime may be negative, use the standard approach
// test if it is -ve, and if so set a flag and make the value +ve
BOOL isNeg;
if (adjustedTime < 0)
{
// we are here if -ve, set flag
isNeg = YES;
// and make the value +ve
adjustedTime = -adjustedTime;
}
else
isNeg = NO;
// at this point adjustedValue is ALWAYS +ve, isNeg is set if it was originally -ve
int hours = adjustedTime / 3600;
int minutes = (adjustedTime / 60) % 60;
int seconds = adjustedTime % 60;
// at this point hours, minutes & seconds MUST BE +VE as adjustedTime is +ve
// format the values, an optional sign based on isNeg followed by three POSITIVE numbers
NSString *newTime = [NSString stringWithFormat:#"%#%02d:%02d:%02d", (isNeg ? #"-" : #""), hours, minutes, seconds];
This can only print AT MOST ONE minus sign at the start from the string.
This approach (though with a test for the minimum negative integer as that cannot be negated) is the standard way to handle this issue.

The solutions presented by Sebastian Keller and CRD both suffer a problem when rolling over from negative to positive values, for example when displaying a countdown that starts with a negative value:
-1.896893 -00:00:01
-1.498020 -00:00:01
-1.099442 -00:00:01
-0.996686 00:00:00
-0.896971 00:00:00
-0.195021 00:00:00
-0.095020 00:00:00
0.004988 00:00:00
0.104940 00:00:00
0.504980 00:00:00
0.904981 00:00:00
1.000516 00:00:01
1.104926 00:00:01
As can be seen, both solutions actually display 00:00:00 for 2 seconds.
The code below instead produces the correct output:
-1.899441 -00:00:02
-1.499838 -00:00:02
-1.095019 -00:00:02
-0.994941 -00:00:01
-0.899903 -00:00:01
-0.195743 -00:00:01
-0.097564 -00:00:01
0.001758 00:00:00
0.100495 00:00:00
0.503691 00:00:00
0.904986 00:00:00
1.004998 00:00:01
1.103652 00:00:01
2.004936 00:00:02
It's actually a category I wrote on NSNumber but the principle should also be applicable to any floating point number:
- (NSString *)ut_hmsString {
NSString *sign = (self.floatValue < 0.0f) ? #"-" : #" ";
float corr = (self.floatValue < 0.0f) ? 1.0000001f : 0;
int seconds = fmodf(fabsf(floorf(self.floatValue)), 60.0f);
int fakesec = fabsf(self.floatValue - corr);
int minutes = fakesec / 60 % 60;
int hours = fakesec / 3600;
return [NSString stringWithFormat:#"%#%02i:%02i:%02i", sign, hours, minutes, seconds];
}

Related

Calculating Coordinated Mars Time v2.0

This is the follow up of a previous question of mine.
In a nutshell, I am trying to follow this tutorial step-by-step: https://jtauber.github.io/mars-clock/ to get to Coordinated Mars Time, but I got stuck right before the end. My code works fine up until the end (some values are more accurate than in the tutorial because I went back to the source from NASA: https://www.giss.nasa.gov/tools/mars24/help/algorithm.html ):
double millis = ( [[NSDate date] timeIntervalSince1970] * 1000 );
NSLog(#"millis: %f", millis);
double JDUT = ( 2440587.5 + (millis / 86400000) );
NSLog(#"JDUT: %f", JDUT);
double JDTT = ( JDUT + (37 +32.184) / 86400);
NSLog(#"JDTT: %f", JDTT);
double J2000Epoch = ( JDTT - 2451545.0 );
NSLog(#"J2000Epoch: %f", J2000Epoch);
double MSD = ( (( J2000Epoch - 4.5 ) / 1.0274912517) + 44796.0 - 0.0009626 );
NSLog(#"MSD: %f", MSD);
The only step remaining is actually calculating Coordinated Mars Time, using this equation:
MTC = mod24 { 24 h × MSD }
The problem is that I have no idea how. I tried to use modf( (double), (double *) ) but no idea how it actually works. I tried it the way below, but it gave me an incorrect answer (obviously as I have really no idea what I am doing). :(
double MSD24 = (24 * MSD);
double MCT = modf(24, &MSD24);
NSLog(#"MCT: %f", MCT); // Result: 0.000000
Any help would be much appreciated. Thank you very much!
p.s.: Notice that I use Objective-C; I do not understand swift unfortunately! :(
Carrying on from the code you gave, I tried:
CGFloat MTC = fmod(24 * MSD, 24);
and got
// 19.798515
which was right according to the web page you cited at the moment I tried it.
The sort of thing his page actually shows, e.g. "19:49:38" or whatever (at the time I tried it), is merely a string representation of that number, treating it as a number of hours and just dividing it up into minutes and seconds in the usual way. Which, I suppose, brings us to the second part of your question, i.e. how to convert a number of hours into an hours-minutes-seconds representation? But that is a simple matter, dealt with many times here. See NSNumber of seconds to Hours, minutes, seconds for example.
So, carrying on once again, I tried this:
CGFloat secs = MTC*3600;
NSDate* d = [NSDate dateWithTimeIntervalSince1970:secs];
NSDateFormatter* df = [NSDateFormatter new];
df.dateFormat = #"HH:mm:ss";
df.timeZone = [NSTimeZone timeZoneWithAbbreviation:#"GMT"];
NSString* result = [df stringFromDate:d];
NSLog(#"%#", result); // 20:10:20
...which is exactly the same as his web page was showing at that moment.
And here's a Swift version for those who would like to know what the "mean time" is on Mars right now:
let millis = Date().timeIntervalSince1970 * 1000
let JDUT = 2440587.5 + (millis / 86400000)
let JDTT = JDUT + (37 + 32.184) / 86400
let J2000Epoch = ( JDTT - 2451545 )
let MSD = (( J2000Epoch - 4.5 ) / 1.0274912517) + 44796.0 - 0.0009626
let MTC = (24 * MSD).truncatingRemainder(dividingBy: 24)
let d = Date(timeIntervalSince1970: MTC*3600)
let df = DateFormatter()
df.dateFormat = "HH:mm:ss"
df.timeZone = TimeZone(abbreviation: "GMT")!
df.string(from:d)

Dart : Show the time until the next time

How to show a countdown time duration until the next alarm
Code:
TimeOfDay _nextSalah(List<SalahModel> salahs) {
DateTime now = DateTime.now();
List<TimeOfDay> times = [];
int currentSalah;
salahs.forEach((s) => times.add(s.time));
times.add(TimeOfDay(hour: now.hour, minute: now.minute));
times.sort((a, b) => a.hour.compareTo(b.hour));
currentSalah = times.indexWhere((time) => time.hour == now.hour);
return TimeOfDay(hour: times[currentSalah].hour, minute: times[currentSalah].minute);
}
But the time difference is wrong and it doesn't animate. Also how to make sure the time difference works when it's the same day and time of the next day i.e. now is Dec 1 2:30 PM and I want to get the difference on Dec 2 6:15 AM.
It does not work because TimeOfDay represents a time during the day, independent of the date that day might fall on or the time zone. The time is represented only by hour and minute.
If you want a countdown that spans multiple days a DateTime must be used and the time difference evaluation needs some math before formatting the result string, something like:
String nextTime(DateTime nextAlarmTime) {
List<int> ctime = [0, 0, 0, 0];
DateTime now = DateTime.now();
int diff = nextAlarmTime.difference(now).inSeconds;
ctime[0] = diff ~/ (24 * 60 * 60); // days
diff -= ctime[0] * 24 * 60 * 60;
ctime[1] = diff ~/ (60 * 60); // hours
diff -= ctime[1] * 60 * 60;
ctime[2] = diff ~/ 60; // minutes
ctime[3] = diff - ctime[2] * 60; // seconds
return ctime.map((val) => val.toString().padLeft(2, '0')).join(':');
}

Convert milliseconds into day,hour,minute and second iOS? [duplicate]

This question already has answers here:
How to convert milliseconds into human readable form?
(22 answers)
Closed 6 years ago.
I need to convert an milliseconds into Days, Hours, Minutes Second.
ex: 5 Days, 4 hours, 13 minutes, 1 second.
Thanks
if you don't want to do the calculation by yourself, you could go for such a solution.
I, however, know that is a kinda costly solution, so you need to be aware of potential performance issues in runtime – depending on how frequently you intend to invoke this.
NSTimeInterval _timeInSeconds = 123456789.123; // or any other interval...;
NSCalendar *_calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
NSCalendarUnit _units = NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
NSDateComponents *_components = [_calendar components:_units fromDate:[NSDate date] toDate:[NSDate dateWithTimeIntervalSinceNow:_timeInSeconds] options:kNilOptions];
NSLog(#"%ld Days, %ld Hours, %ld Minutes, %ld Seconds", _components.day, _components.hour, _components.minute, _components.second);
You can write your own function like this:
import UIKit
let miliseconds: Int = 24 * 3600 * 1000 + 3700 * 1000
// 1 day and 1 hour 1 minute 40 seconds
func convertTime(miliseconds: Int) -> String {
var seconds: Int = 0
var minutes: Int = 0
var hours: Int = 0
var days: Int = 0
var secondsTemp: Int = 0
var minutesTemp: Int = 0
var hoursTemp: Int = 0
if miliseconds < 1000 {
return ""
} else if miliseconds < 1000 * 60 {
seconds = miliseconds / 1000
return "\(seconds) seconds"
} else if miliseconds < 1000 * 60 * 60 {
secondsTemp = miliseconds / 1000
minutes = secondsTemp / 60
seconds = (miliseconds - minutes * 60 * 1000) / 1000
return "\(minutes) minutes, \(seconds) seconds"
} else if miliseconds < 1000 * 60 * 60 * 24 {
minutesTemp = miliseconds / 1000 / 60
hours = minutesTemp / 60
minutes = (miliseconds - hours * 60 * 60 * 1000) / 1000 / 60
seconds = (miliseconds - hours * 60 * 60 * 1000 - minutes * 60 * 1000) / 1000
return "\(hours) hours, \(minutes) minutes, \(seconds) seconds"
} else {
hoursTemp = miliseconds / 1000 / 60 / 60
days = hoursTemp / 24
hours = (miliseconds - days * 24 * 60 * 60 * 1000) / 1000 / 60 / 60
minutes = (miliseconds - days * 24 * 60 * 60 * 1000 - hours * 60 * 60 * 1000) / 1000 / 60
seconds = (miliseconds - days * 24 * 60 * 60 * 1000 - hours * 60 * 60 * 1000 - minutes * 60 * 1000) / 1000
return "\(days) days, \(hours) hours, \(minutes) minutes, \(seconds) seconds"
}
}
convertTime(miliseconds)
//result is "1 days, 1 hours, 1 minutes, 40 seconds"
try this
NSTimeInterval time = <timein ms>;
NSInteger days = time / (24 * 60 * 60);
NSInteger hours = (time / (60 * 60)) - (24 * days);
NSInteger minutes =(time / 60) - (24 * 60 * days) - (hours * 60);
NSInteger seconds = (lroundf(time) % 60);
I have write the easy code to do this in both Objective-c and Swift:
Swift
var milliseconds : double_t = 568569600;
milliseconds = floor(milliseconds/1000);
let seconds : double_t = fmod(milliseconds, 60);
let minutes : double_t = fmod((milliseconds / 60) , 60);
let hours : double_t = fmod((milliseconds / (60*60)), 60);
let days : double_t = fmod(milliseconds / ((60*60)*24), 24);
NSLog("seconds : %.f minutes : %.f hours : %.f days : %.f", seconds, minutes, hours, days);
Output - seconds : 9 minutes : 56 hours : 38 days : 7
Objective
double milliseconds = 568569600;
milliseconds = milliseconds/1000;
float seconds = fmod(milliseconds, 60);
float minutes = fmod((milliseconds / 60) , 60);
float hours = fmod((milliseconds / (60*60)), 60);
float days = fmod(milliseconds / ((60*60)*24), 24);
NSLog(#"seconds : %.f minutes : %.f hours : %.f days : %.f ", seconds, minutes, hours, days);
Output - seconds : 10 minutes : 56 hours : 38 days : 7

How to convert difference between two times into hours only?

I found the answer to this, but unfortunately it's using Java. I have two times, formatted as HHmm (no colons). I need to figure out how many 15 minute time segments are in the difference. For example, I have a start time of 1000 and an end time of 1130 (military time).
When I subtract the two dates, I get 130, which is meaningless for computations.
Is there an existing method that will do this for me? (I have spent the last 6 hours trying SO and Google, but found nothing).
UPDATE: I would appreciate it if whoever downvoted me please reverse it. The question is very pertinent and others will find it useful. Thank you.
Parse each time and convert to minutes. So 1000 becomes 10 hours 0 minutes for a total of 600 minutes. 1130 becomes 11 hours 30 minutes for a total of 690 minutes. Subtract the two values for a difference of 90 minutes. Now divide by 15 to get 6.
The following assumes all times are 4 digit military times:
NSString *startTime = #"1000";
NSString *endTime = #"1130";
int startMinues = [[startTime substringToIndex:2] intValue] * 60 + [[startTime substringFromIndex:2] intValue];
int endMinues = [[endTime substringToIndex:2] intValue] * 60 + [[endTime substringFromIndex:2] intValue];
int minutes = endMinutes - startMinutes;
int units = minutes / 15;
This gives whole units of your 15 minute blocks.
Use -[NSCalendar components:fromDate:toDate:options], like this:
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalenderUnitMinute fromDate:startDate toDate:endDate options:0];
NSInteger numberOfMinutes = [components minute];
Once you have the number of minutes, it should just be a matter of dividing by 15 to get the number of 15 minute chunks.
Try using NSDateComponents:
NSCalendar *calendar = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease];
NSDateComponents *components = [calendar components:NSMinuteCalendarUnit|NSHourCalendarUnit
fromDate:dateA
toDate:dateB
options:0];
int increments = components.hour*4 + components.minute/15;
Format is rather simple:
int HHmm = [date intValue];
int HH = HHmm / 100;
int mm = HHmm % 100;
Diff, for two parsed dates:
int diff = ((HH2 * 60 + mm2) - (HH1 * 60 + mm1)) / 15;

Calculating seconds to millisecond NSTimer

Trying to work out where I have screwed up with trying to create a count down timer which displays seconds and milliseconds. The idea is the timer displays the count down time to an NSString which updates a UILable.
The code I currently have is
-(void)timerRun {
if (self.timerPageView.startCountdown) {
NSLog(#"%i",self.timerPageView.xtime);
self.timerPageView.sec = self.timerPageView.sec - 1;
seconds = (self.timerPageView.sec % 60) % 60 ;
milliseconds = (self.timerPageView.sec % 60) % 1000;
NSString *timerOutput = [NSString stringWithFormat:#"%i:%i", seconds, milliseconds];
self.timerPageView.timerText.text = timerOutput;
if (self.timerPageView.resetTimer == YES) {
[self setTimer];
}
}
else {
}
}
-(void)setTimer{
if (self.timerPageView.xtime == 0) {
self.timerPageView.xtime = 60000;
}
self.timerPageView.sec = self.timerPageView.xtime;
self.timerPageView.countdownTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:#selector(timerRun) userInfo:Nil repeats:YES];
self.timerPageView.resetTimer = NO;
}
int seconds;
int milliseconds;
int minutes;
}
Anyone got any ideas what I am doing wrong?
You have a timer that will execute roughly 100 times per second (interval of 0.01).
You decrement a value by 1 each time. Therefore, your self.timerPageView.sec variable appears to be hundredths of a second.
To get the number of seconds, you need to divide this value by 100. To get the number of milliseconds, you need to multiply by 10 then modulo by 1000.
seconds = self.timerPageView.sec / 100;
milliseconds = (self.timerPageView.sec * 10) % 1000;
Update:
Also note that your timer is highly inaccurate. The timer will not repeat EXACTLY every hundredth of a second. It may only run 80 times per second or some other inexact rate.
A better approach would be to get the current time at the start. Then inside your timerRun method you get the current time again. Subtract the two numbers. This will give the actual elapsed time. Use this instead of decrementing a value each loop.
You set a time interval of 0.01, which is every 10 milliseconds, 0.001 is every millisecond.
Even so, NSTimer is not that accurate, you probably won't get it to work every 1 ms. It is fired from the run loop so there is latency and jitter.
These calculations look pretty suspect:
seconds = (self.timerPageView.sec % 60) % 60 ;
milliseconds = (self.timerPageView.sec % 60) % 1000;
You are using int type calculations (pretty sketchy in their implementation) on a float value for seconds.
NSUInteger seconds = (NSUInteger)(self.timerPageView.sec * 100); //convert to an int
NSUInteger milliseconds = (NSUInteger) ((self.timerPageView.sec - seconds)* 1000.);

Resources