Study the information about on time/in time, at the end / in the end.

1. On/in+ time

We say ‘on time’ in the meaning ‘to be punctual, not late’. If something happens on time, it happens at the time which was planned.

The 10.35 train left on time (=it left at 10.35)
We use in time when we mean ‘soon enough’.

Will you be at home in time for supper? (soon enough for supper)
We can say ‘just in time’ in the meaning ‘almost too late’.

We got to the airport just in time to check in.

2. At/in + the end

At the end is used when we mean ‘at the time when something ends’.

At the end of the film
At the end of the month
She is going to Madrid at the end of April.
In the end is used when we mean ‘finally’.
We use ‘in the end’ when we say what the final result of a situation was.

We had a lot of problems with our flat. In the end, we sold it and bought a house.