Calculating wait time

I’m trying to calculate the time it takes for an object to lerp to a position. I’ve tried using a simple physics formular: time = distance / velocity, but since the velocity (speed) is multiplied by Time.deltaTime, this doesn’t work.

Is there any way I can accurately calculate the time it takes the object to lerp to a given position?

You’ll never calculate lerp time 100% precisely.
But if you assume the lerping to be ended when the remaining distance is less than, lets say, 1% of the original lerp distance, and using Time.smoothDeltaTime to compensate deltaTime min & max values during the lerp, you could calculate quiet accurate time.

float distance; // from original position to target
float lerpModifier; // 3rd parameter in Lerp functions, aka lerp speed
int lerpIterationCounter = 0;
float threshold = distance / 100; // 1% of the original distance
do {
    lerpIterationCounter ++;
    distance -= distance * lerpModifier; //substruct the difference in distance after every lerp iteration
} while (distance > threshold);

// now that we know how much lerp iterations it will take to move along 99% of the distance
// lets calculate how much time it will take
// using some kind of average deltaTime called 'smoothDeltaTime'
float time = lerpIterationCounter * Time.smoothDeltaTime;

Also, it’s better to make these calculations in a coroutine, so it won’t lead to the stuttering of the framerate. Because if the distance is large enough and if the lerp modifier is small (like Time.deltaTime), then there’s going to be very very big amount of iterations and the game will stutter every time you calculate this stuff:

float lerpTime = 0f;

private IEnumerator CalculateLerpTime (float distance, float lerpModifier) {
    int lerpIterationCounter = 0;
    float threshold = distance / 100;
    do {
        lerpIterationCounter ++;
        distance -= distance * lerpModifier;
        yield return null;
    } while (distance > threshold);
    
    lerpTime = lerpIterationCounter * Time.smoothDeltaTime;
}

void SomeMethod () {
    // check if calculations are done
    if (lerpTime != 0f) {
        // do something with it
        lerpTime = 0f;
    }
}