Yes, just write the code.
Properly designed code uses the "loop" function to cycle in the order of a thousand times per second. You use the "millis()" counter to determine how much time is actually passing so for your inertia function, you arrange the code to regularly - say five times a second - increment or decrement your "speed" variable which sets the PWM value to the ESCs, toward the commanded speed.