What is the significance of the time it takes to say Shalom Alecha Rebbi (U'mori)?
Tosafos (Bava Basra 129b, s.v. vehilchesa) offers the following reason:
Suppose that a person is just completing a business deal, and as he's transferring the goods he realizes that he's making a mistake and wants to cancel the transaction. Now also suppose that, at the same moment, his teacher (or another prominent Torah scholar to whom he is obligated to show respect) passes by. He'll be caught in a dilemma: if he takes the time to greet them respectfully, as he should, then the deal will be final and he'll be unable to retract; on the other hand, it's disrespectful to finish his business and only then to acknowledge them. The solution? Allow him the time it takes to greet them with "shalom alecha rabi (umori)," and to still be able to cancel the deal immediately thereafter.
Once, then, this timeframe is established as the standard for the amount of time in which a person can retract a business deal, it is used in other halachic contexts too.
Ran cites the Raavad, who gives another rationale:
When reciting Shema, one may pause (even in the middle of a passage) in order to reply to someone out of yir'ah (Berachos 13a). Rashi there explains "yir'ah" to mean "fear of being killed," such as by a ruler who would take offense at not being greeted respectfully; but Raavad takes it to mean "awe," as in what one should feel towards his Torah teacher. Since, then, according to this understanding, greeting him (with this three- or four-word phrase) is not considered a real interruption of the Shema, then this establishes the precedent that the time it takes to say this phrase is not considered an interruption for other purposes either.
I once heard from my rabbi in high school that it was about 3 seconds. Not sure the source, but it always made sense to me. Witnesses also must recite their identical testimony within that same timeframe.