Given a stream of time-stamped sensor readings, write a function to calculate the moving average of a specific metric over a sliding time window.