Make something arrive at position in exactly X seconds?

So I want to have an object arrive at a position in exactly X seconds (not sooner or later), how would I go about calculating this?

Check the Unify Wiki, I use this, and it works great.

You can do it over time or by speed.

Given that you know the object’s starting position and its desired end position, you can use something like this:

IEnumerator MoveToPosition(Vector3 startPos, Vector3 endPos, float moveTime)
{
    float curTime = 0;
    while (curTime < moveTime)
    {
        transform.position = Vector3.Lerp(startPos, endPos, curTime / moveTime);
        curTime += Time.deltaTime;
        yield return null;
    }
}