just in time
adverb
- production and fullfillment of a resource, product, or service only when needed (rather than beforehand)
Wiktionary
adv
- At the last possible moment; just before or within the assigned time.
“I very nearly drove into the car in front, but thankfully I managed to stop just in time.”