How to make use of simulator's time multiplier to speed-up the simulation clock

We need to simulate the UAV to perform tasks many throusands of times, which takes an average of tens of seconds each time, which is quite time-consuming. Is there a way to make use of simulator’s time multiplier to speed-up the simulation clock by modifying the source code, similar to the speed-up gear in windows.

Yes, you can speedup the SITL simulations by using the sim_vehicle.py --sim-speedup parameter