Cranking a starter takes a lot of amps, even if just a short time.
The 12V output on little gennies is very low amps, I would think you'd have to charge a flat batt for at least a few hours, assuming the battery is healthy.
If you have a high-amp mains charger plugged into the genny's AC current output, depending on how healthy / flat the battery is, 20-40 min may be enough, but of course longer is better, up to say 3 hours.
Keep the charger going while cranking to help support the voltage, as long as it is a good one with overcurrent protection.
But you're really needing to crank off the battery, not the batter charger itself.
So if the batt is truly flat, that may just suck up all incoming power without releasing enough to crank the engine. If it's at EOL or shorted internally forget it.
There are pocket sized lithium jumper powerpacks that are great for this, just need to keep one charged if you also use it for charging phones too, they make bigger ones (like a VHS tape) that'll start a big diesel truck. just FFR.
All this is made much more difficult if the battery is very cold.