Risk of death more than doubles with long emergency waits, analysis shows