Meanwhile, strain the pan juices into a bowl. Skim off the fat; pour 1/4 cup of the fat into a large, deep skillet. Add the sweet onion and thyme sprig and cook over moderately high heat until the onion is browned, about 5 minutes. Add the garlic, then stir in the flour. Gradually add the stock, whisking constantly, until smooth. Whisk in the reserved pan juices and simmer the gravy over low heat, whisking often, until no floury taste remains, about 15 minutes. Discard the thyme and garlic. Season the gravy with salt and pepper and transfer to a warmed gravy boat.