Average values from stdout over a given interval