Downsampling by block averaging
Averaging by N but keeping the same sample rate is equivalent to filtering input "y" with an FIR filter "B". Where B = 1/N * ones(1,N);

yFiltered = filter(B,1,y);

Now you simply need to downsample the data by N. I'm not sure exactly how the engineer implemented the original algorith, but I would do this.

yDownsampled = yFiltered(N:N:end); 

Basically start at index "N" and keep 1 out of N samples until the end.

Your starting index can be anything between 1 and N, you can toy around with it.

You'd need to do the same with your time vector.