In the Nick of Time
The clock was ticking down rapidly.
She did not think she would finish in time.
She answered the second to last question.
Finally the answer to the last question appeared before her.
She handed in her test just in the nick of time.