to barely make it on time
To come very close to being late for something (such as a deadline, appointment, class, etc.) but manage to arrive on time in the end. Traffic was so bad this morning that I barely made it on time to the meeting. I was finishing my essay right up until the minute before it was due. I barely made it on time!