The uC is more than fast enough to measure the difference (after all, if it runs in the ~40MHz range it can measure differences of about 25 nanoseconds, while sound tends to work in the ms range). The hard part is making sure it's the same sound you are hearing. The ultrasonic rangefinders you normally see you some filter circuitry that just produces a generic spike (which translates directly, or through a transistor or something else as a HI) whenever an echo is received. In some cases the receiver has a narrow enough bandwidth that it doesnt need a filter (it might need an amplifier though). The uC can easily measure the time difference between these two spikes (it assumes that it's transmission is the only one out there, therefore the spikes represent the same sound). Whether or not the two incoming spikes represent the same sound is a much more tricky matter, but you usually don't need it.