I am implementing alarm functionality for Apple's Watch application. So here I have to compare current time with user time and I have to get current time for every 1 sec, so that I have implemented the code like below but this is not working. Can any body please post appropriate code in Objective-C..
for (int i=0; i<86400; i++)
{
if ([getTotalDate isEqualToString:self.curTime])
{
NSLog(@"It's Alarm Time");
[self presentControllerWithName:@"FifthViewController" context:nil];
break;
}
else
{
NSLog(@"not alarm time");
//[self currentTime];
}
}