Melt butter in a large sauté pan over medium-high heat. Add onion, and sauté for 4-5 minutes until soft and translucent. Add garlic and sauté for an additional 1-2 minutes until fragrant. Stir in the flour until it is evenly combined, and cook for 1 more minute. Gradually pour in the stock, and whisk until combined. Add in the milk, salt, pepper, and 1 teaspoon thyme, and whisk until combined. Continue cooking for an additional 1-2 minutes until the sauce just barely begins to simmer around the edges of the pan (avoid letting it come to a boil) and thickens. Then remove from heat and set aside.