Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jim93

macrumors newbie
Original poster
Jun 27, 2009
16
0
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?
 
Code:
NSTimeInterval	now = [NSDate timeIntervalSinceReferenceDate];

Just save those and subtract.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.