By the time I got up, my brother had already gotten in the shower.
But by the time I went outside, the bus had already left.
But when I got to school, I realized I had left my backpack at home.
But when I got home, I realized I had left my keys in the backpack.
But by the time I got back to school, the bell had rung.
by the time I walked into class, the teacher had started teaching already.
But before I got to the bus stop, the bus had already left.
at least by the time you got to school, you were only five minutes late for class.