Reputation: 1619
how to calculate average of time intervals in iphone development
Upvotes: 2
Views: 433
Reputation: 17012
You could just keep all time intervals you'd ever seen, and average them each time. But a smarter way to do it is to use a technique called "Running average", whereby as new measurements come in you calculate a new average based on the 'old' average and the new value. There's a mention of it here but it's not the clearest explanation.
Upvotes: 2