I think you are getting confused. Generators have to be run for at least 10 seconds before they can take load, this is simply to allow their control circuits to operate and the output voltage to stabilise.
In a full supported system, the battery UPS generates mains that was synchronised with the now missing mains and the diesel starts. Once the mains has "gone" (< 80%?) the UPS takes the load. After the diesel has stabilised (10 seconds?), it would be very sophisticated if the UPS changed its frequency to that of the diesel generator, but in the systems I have used, the Diesel alternator just takes the load from the mains via a contactor. The side effect is that the diesel alternator now supplies the UPS. With certain UPSs, if the frequency of the alternator is out by 1 HZ from its nominal, they will not use that generated mains, which gives you 10 minutes to sort the diesel or get the mains back.
Frank