in the nick of time
Definition from Wiktionary, the free dictionary
- (idiomatic) At the last possible moment; at the last minute.
- He finished writing his paper and slid it under the door just in the nick of time.
at the last possible moment