Cut the onions into thin slices. Melt the butter in a heavy-based saucepan over a low heat. Add the onions and cook gently for 45 minutes, stirring every 10 minutes. Pour in the cream, add the thyme leaves and simmer for another 20 minutes or so. Season with salt and pepper and tip into a bowl, set aside.
To bake the tartlets, preheat the oven to 170°C Gas 3. Roll pastry on a light floured surface to a 3mm thickness. Using a 12cm plain round pastry cutter, cut out 4 discs and place on a baking sheet. Rest in the fridge for about 20 minutes.
Prick each pastry disc 4 or 5 times with a fork. Spread the onions evenly on top of the discs, then bake for 25-30 minutes: the bottom of the pastry should be well cooked and crisp.
Put the poached eggs in a bowl, carefully pour on boiling water and leave them for 30 seconds only to warm through. Drain well and put a poached egg on each onion tartlet. Top with a sprig of thyme and serve on warm plates.