When is combat started and spell casting in combat time

So I was playing yesterday and our party had been wandering through tunnels and the DM said there was some noise in the distance so one of the players illuminated an object and threw it down the winding corridor about 80 feet from where My player was at (I had just stepped through a door to another room also and the DM said the player that tossed the light sees a very large blue hand on the corner of a wall. At that point I said I wanted to cast the Leomunds Tiny Hut, which he said okay to, but then said it would take 10 rounds because we are in combat, I argued we hadn’t started combat yet, we are just in a state of exploring still and aren’t aware that the creature means us harm yet. He argued that he’s the DM and he determines how fast time moves and I would have had time to cast the 1 minute spell, though about 3 minutes of live time passed before we learned anything about the creature at all, and then he said I can keep casting the spell for the next 10 combat rounds our stop the spell and burn the spell slot. I disagreed. The logic problem I had was that, this seems like a logical problem because any time you go to cast a spell how do you know if your going to waste the spell because you later find out you are in combat because the DM decides so.