Poll your real time sensor and display both its result and the average result continuously, but use timer interrupt to trigger the other sensor and code that calculates the average only when needed (in intervals).
Poll your real time sensor and display both its result and the average result continuously, but use timer interrupt to trigger the other sensor and code that calculates the average only when needed (in intervals).