That's not an average. That's a single pole IIR (Infinite Impulse Response) filter.
If you want to get a 1-minute average updated every second then you need to store the previous 60 readings. That way you can always see what the reading was 60 seconds before "now". But the original code didn't do anything like that. It writes the average of the last N seconds to the SD card every N seconds. (N=1.000) So it doesn't need to do any running average.