Perception in real-time: predicting the present, reconstructing the past