Well, lets think, he had JUST mastered kcm (which was an exhausting battle). He immediately broke through that barrier, and ran all the way to the battlefield non stop. NON. STOP. In kcm. However those first 2 days and nights can't be counted. He wasn' there for that. however, he got their around the time night time was starting (moon was showing). So i assume the obito fight started at dusk. Then they fought all through the night and all day (hard to tell in the other dimension). Now its day again.
So i say 24 hours, not counting the stuff he did before coming here. If you count that stuff (fighting madara with kages, fighting nagato, etc), i will say a day and a half.