I try to produce a moving average function and count a time between period update events. Description of function — please see comments near code.
(I know there a