Analog time machine in a photonic system