Gets a delay based on the max retries and remaining retries
new delay as a Duration object
maximum amount of available retries
remaining number of retries available