We learned from a Universal employee that it takes 35 minutes to leave Diagon Alley, exit the park, enter Islands of Adventure and walk to Hogwarts. So if the wait is 40 minutes for the Hogwarts Express (and your kids can handle the hike) don't take the train. You'll save time just walking around.