Calculate average of time intervals
how to calculate average 开发者_高级运维of time intervals in iphone development
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.
精彩评论