It looked like it happened quickly. One minute Yamato was swallowed, the next he's in Madaras lair.
It was a long time to us, but to the ninjas fighting, it was probably instant.
It is also possible that Kabuto's weird insides prevented him from using ninjutsu, I mean Yamato was all tied up with snakes when he was out...