in the nick of timeexprexpression: Prepositional phrase, adverbial phrase, or other phrase or expression--for example, "behind the times," "on your own."
(just before [sth] is too late)
非常及时
在紧要时刻
正好赶在关键时刻
The doctors got to him in the nick of time and managed to restart his heart.