UPS Flight 6 had around 3:51 minutes from the very first alert of a fire to the Captain stating he had no aircraft pitch control. At 7:08 minutes he had no more O2 and left his seat to find O2. He never returned.
Asiana Airlines Cargo Flight 991 was lost to radar contact 8 minutes after they reported a fire on board. (not a verified Li battery fire but over 800 lbs of them where delcared)
If its a li battery fire you will not have much time.