How can I make my offset stay for a certain amount of time?

I was just wondering how I can put a time limit on this offset so it stays at this offset until the set time is up if this is even possible, I am new to coding in c# and unity so any help would be appreciated. Thanks

    public void Jump()
    {
    if (Input.GetKeyDown(KeyCode.Space) | (Input.GetKeyUp(KeyCode.Space)))
    {
        IsJumping = !IsJumping;

        if (IsJumping)
        {
            rhRegularOffset = rhJumpingOffset;

        }
        else
        {
            rhRegularOffset = noAimRhRegularOffset;
        }
    }
    }

You can use the script below

     // Update is called once per frame
     void Update()
     {
          if (Input.GetKeyDown(KeyCode.Space))
          {

               if (IsJumping == false)
               {
                    IsJumping = true;
                    rhRegularOffset = rhJumpingOffset;
                    Invoke("resetOffset", timeWaiting);
               }


          }

     }

     public void resetOffset()
     {
          rhRegularOffset = noAimRhRegularOffset;
          IsJumping = false;
     }