Melt the butter in a Dutch oven or large skillet over medium heat. Once the butter starts to foam, add the leeks and stir-fry them until they soften up a bit, 5 to 7 minutes. Stir in the potatoes, cover the pan, and cook the potatoes and leeks, stirring occasionally, until they are barely tender, 8 to 10 minutes. Stir in the thyme, salt, and peppercorns and remove the pan from the heat.