With an untreated leg injury, how long would you have until you got gangrene?

Depends. Gangrene is just another term for dead tissue. It can be located anywhere, and depending on its cause, may be present in multiple locations on the body. A leg injury may or may not become gangrenous, depending on a multitude of factors.