Time

In the nick of time

Just before it is too late.