How long can you survive 1 million degrees? I asked my Dad this once when I was about 14, and he said that no matter how short the amount of time you were exposed to such a great temperature, you would surely die.  The conversation went something like: 
Me:  What about a millisecond?
Dad: Of course not.  
Me:  A nanosecond?  
Dad: Nope.  
Me:  10^-247 seconds?  
Dad: Death.  

15 years later I still think that you could survive for some amount of time even though you'd surely get a few layers cooked.  Thus, what's the longest period that you could theoretically withstand 1,000,000 degrees F heat and live to tell about it?  Let's assume that you are wearing normal clothes (a t-shirt, jeans, sneakers, sunglasses, and a baseball cap), that the air around you is the only thing that is heated, and that after the time is up your friend sprays you with a fire extinguisher and the air magically returns to a nice 73 degrees F.  
 A: Let me mention that the air heated to 1 million degrees isn't a gas. It's probably plasma.
Just order-of-magnitude estimates. It takes seconds for your exterior skin temperature to drop or increase by 1 deg C if the body-air temperature difference is 10 deg C or so. If it were 1 million deg C, i.e. 100,000 times higher, the heating of the skin would be roughly 100,000 times faster but it seems likely to me that even microseconds would still be fine: that may be the time scale at which you would start to feel burns.
However, one would have to analyze the actual behavior of the "hot air", as you call it, namely the plasma. At a million of degrees, it is ionized and emits thermal X-rays. This is a very harmful, ionizing radiation. The plasma itself is ionized, too. These conditions probably lead to the creation of cancer more quickly than you get burned by the heat. So a more relevant calculation than heat answer would probably deal with the number of X-ray photons that you can "sort of non-lethally" absorb from the "air". 
The thermal radiation is unavoidable and dominant. The first paragraph only discussed heat conduction. But the thermal radiation goes like $\sigma T^4$ so if the temperature is 160 times greater than the Sun's surface temperature, the radiation carries $(160)^4\sim 10^9$ times larger energy flux than if you're sitting next to the Sun's surface. And the energy fluxes near the Sun's surface are about $10^{5}$ times greater than on a sunny beach, so the thermal radiation is about $10^{14}$ times more intense than the solar radiation. So even if you only view this radiation as a non-carcinogenic heat, the safe time may be reduced to something like $10^{-14}$ seconds. When you realize that the energy counting heavily understates the harmful influence of the X-rays, you will get to a shorter timescale of safety, perhaps $10^{-20}$ seconds.
At any rate, I am confident that you will never get to something like $10^{-247}$ seconds. From a practical viewpoint, nothing happens at these extremely short time scales, they're really unphysical. You would probably not absorb a single thermal X-ray photon during such a ludicrously short timescale so such short exposures may be called "totally safe". They're also totally impossible, of course. You can never design a switch that would only "turn something on" for $10^{-247}$ seconds.
A: I'm with Luboš on that the radiation will kill you, but only if the pressure doesn't kill you first. 1,000,000 degrees Fahrenheit is about 500,000 degrees Celsius, so in proportions of absolute temperatures (Kelvin), that would be about 2,000 times room temperature. In a sealed room, that means that you're suddenly under 2,000 times as much air pressure. Since normal atmospheric pressure is about $10 \text{ N/cm}^2$, you'd be experiencing a sudden $20,000 \text{ N/cm}^2$. That's roughly equivalent to a car sitting on every square centimeter of your body. I don't know how quickly the body can implode, but I wouldn't expect you to last long. 
A: More heuristics: 
1 million Kelvin corresponds to 86 electron volt, which is more, by a factor of 10, than any bond-dissociation energy for reasonable molecules. 
The mean speed of the oxygen atoms coming for you should be in the range of 35000 m/s, i.e. 100 times the speed of sound (for the calculation, I plugged in "2*Sqrt[2*(Boltzmann constant)*10^6 (Kelvin) / (Pi 16 * proton mass)]" on WolframAlpha).
A: More than 5 minutes...
Any contact to a dense material at a million degrees would certainly be quite deadly as Lubos correctly pointed out. Try to estimate the thermal energy involved that would be absorbed if you "touched" a block of metal (i.e. high density plasma) at this temperature. 
On the other hand adding on to Jerry's comment the time can be much longer if you only barely touch something that hot. It turns out that this is actually a nice medical application for plasmas: you can burn away the bacteria on your skin but not too much else happens: Plasma jet in Journal of Physics D, Plasma jet on geek.com. 
The plasma is created from a 10kV voltage source, so the temperature of these gas molecules will certainly be quite high (but maybe not a million). On the other hand the density is so small compared to normal surrounding air that not much damage to the skin happens. It took five minutes to "burn" through 17 layers of bacteria, so it might take a long time until serious damage to your skin happens. 
A: The plasma you'd be in could be of extremely low density and pressure. It could be almost vacuum, just a few atoms, but with very high velocity. So it would have an extreme temperature, but the total thermal energy would be very low, and the gas would immediately cool down by contact with your skin. In such a case, you wouldn't be harmed by the temperature at all. The only factor would be how long could you survive in the vacuum. And since information about pressure change travels by the speed of sound, if the time were be sufficiently short, your body wouldn't actually notice he vacuum.
A similar phenomenon occurs in our solar system. Sun's corona has about one to three million kelvin, but since it's density is $10^{12}$ lower than Sun's photosphere, it radiates about one millionth of visible light compared to Sun's surface.
A: An environment of 1 million Kelvin would irradiate the human body (which is about $2\,\, m^2$) with around $10^{17}$ Watts per the black body law:
$$Q=\sigma_{SB}AT^4$$
If we estimate the human body as 200 lbs of water, it  takes about $10^7$ Joules to heat the body to 150°F (a generous estimate for what would cause instant death).  So my answer is, "Not longer than $10^{-10}\, s$."
