FR 998 then FR 9674 at Madrid
Wroclaw → Madrid → Rome
Timetable, Madrid time
21:20FR 998 from Wroclaw at the gate
16:00FR 9674 to Rome leaves the gate
18 h 40 apart on the timetable, overnight
FR 9674 leaves 18 h 40 after FR 998 arrives on the timetable: more than half a day, so not a connection we count.