A complaint is upheld about the time it took to provide a man with treatment at Dumfries Infirmary.