Rafael Nadal had a dispute with the umpire after being given a warning for taking too long on his toilet break.