delayCreates a delay for a specified number of milliseconds and returns a resolved promise after the delay.