i am try to making a timer counter in my application but i did't get right ans i succes to make timer counter but i dont know how to start timer with accelerometer i wan't when i take steps then my timer should run or when i stop then my timer should stop
i have steps counter with the help of acceleration hardware
this is my timer counter method
this for duration
-(void)timepassed
{
//counter++;
counter++;
if (counter == 60) { sec++; counter = 0; }
if (sec == 60) { min++; sec = 0; }
if (min == 60) { hr++; min = 0; }
}