Fetching details from the dictionary...

to be in time (for)
to serve (suit, meet) the purpose; to be good enough; to be enough; to manage; to make do
早く出れば電車に間にあう。
If you leave early, you'll be in time for the train.
走ったので電車に間にあった。
I ran so I made it to the train.
全力で走って始業式に間にあった。
I ran with all my might and was in time for the opening ceremony.