A long time…because I know you can’t tread water long enough to save yourself in such a situation, so you shouldn’t try.
Instead, you float (and I learned this from my dad, who’d been through survival training for the Air Force). A normal, healthy human can float face down in the water indefinitely. You just need to turn to breathe. In reasonably calm water, this takes vastly less energy than treading water.
Better yet, the pant legs of most tight-weave cotton pants or of military nylon flight suits will hold air just fine when wet. Take off your pants and knot the legs, fill them with air and thrust the waist down under your body. There. You can now float safely for free (no expenditure of energy). The air will leak out, but it will hold long enough to rest or even take a short nap. You can even tie the pant legs together and put your head through like a life preserver.
Pull your flight jacket up over your head and you have a sunscreen. This will keep you from blistering and losing moisture even faster to the harsh sun. Keep those aviator glasses zipped into their pocket—they can signal a plane. If it rains, the same jacket can catch fresh water and give you a drink.
People have survived for days with less.
The real question is, why did my dad tell me all this? Easy. He knew I’d grow up to be a writer. 😉