Input NSTimer compare

Discussion in 'iOS Programming' started by jim93, Aug 5, 2009.

  1. jim93 macrumors newbie

    Jun 27, 2009
    I was wondering what would be the best way to compare the time an input has been received and the time a recurring action by NSTimer. How could i know when the input has been received relative to the NSTimer event I programmed?
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    NSTimeInterval	now = [NSDate timeIntervalSinceReferenceDate];
    Just save those and subtract.
  3. jim93 thread starter macrumors newbie

    Jun 27, 2009
    I get it you mean I add that in my event handler for my input and in my timer loop and subtract when I want to compare.

    cool. I get it. thank you.

Share This Page