IF the ignition sensor is on the flywheel, then it must be a 2-cycle engine
By no means. Every Briggs and Stratton single cylinder 4-stroke engine I've ever worked on had a flywheel magneto generating 1 spark per rev.
How many million lawnmowers does it take to prove that this works?
Allan
edit.
OP : given a generator runs at constant speed, how much improvement do you expect to acheive with variable spark timing?