I suspect you don't have an inverter. They change 12v battery power to 120v AC. What you're probably thinking of is a converter which is the RV industry's term for a battery charger. Apparently yours is wired so the battery disconnect does not disconnect the converter, only the loads.
Your generator is likely charging thru your converter. Depending on what model of converter you have it may only put out a measly 10 amps for battery charging.
How long do you need to run it? Depends on battery size, charger size, wiring in between, battery condition, other loads that may be on while charging, etc.
If you run your battery(s) way down it will likely take many hours to recharge them from the generator with your stock set up. A converter upgrade is likely in order if you need to charge this way very often.