/* Stalls the BSP for the minimum of POLL_INTERVAL_US and Timeout. */
STATIC UINTN CalculateAndStallInterval(IN UINTN Timeout)
/* Stalls the BSP for the minimum of POLL_INTERVAL_US and Timeout. */
STATIC UINTN CalculateAndStallInterval(IN UINTN Timeout)
{
  UINTN  StallTime;
  if ((Timeout < POLL_INTERVAL_US) && (Timeout != 0)) {
    StallTime = Timeout;
  } else {
    StallTime = POLL_INTERVAL_US;
  }
  gBS->Stall (StallTime);
  return StallTime;
}