Using till instead of before or when
I’d reached the school till the rain started.
I’d reached the school before the rain started. Or I’d reached the school when the rain started.
Before or when introduces a clause of time, if the verb of the main clause denotes an action completed before that of the time clause.