idiom
in the nick of time
в последнюю возможную минуту; как раз перед тем, как будет слишком поздно
Meaning
at the last possible moment; just before it’s too late
Example
He arrived **in the nick of time** to catch the train.
Он приехал **ин зе ник оф тайм**, чтобы успеть на поезд.