Frequency/Pulse Measurement

Is it possible to modify the below code to get a rolling average of anemometer readings from the previous 10 readings?

try this one - Arduino Playground - HomePage -