J jim93 macrumors newbie Original poster Aug 5, 2009 #1 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?
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?
PhoneyDeveloper macrumors 68040 Aug 5, 2009 #2 Code: NSTimeInterval now = [NSDate timeIntervalSinceReferenceDate]; Just save those and subtract.
J jim93 macrumors newbie Original poster Aug 6, 2009 #3 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.
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.