without a moment to spare
At the last possible moment before it is too late; just in the nick of time. The police arrived without a moment to spare, apprehending the criminal just before he fired his gun. A: "The surgeon has just arrived." B: "And without a moment to spare! This patient needs an operation immediately!"