When the same delay time should be used in a loop or multiple times, then re-calculating the pre-scaler and auto-reload-value is a waste of time. Instead, there should be a function that simply takes these values as a parameter.
When using this function it is the responsibility of the caller that the values are correct.
The calculation functions are already available:
DelayStm32::CalculateRequiredPrescaler(...)
DelayStm32::CalculateRequiredClocks(...)