While pasta water is heating, melt the butter in a large skillet over medium-low heat, then add the onion. Cook the onion over medium heat, stirring frequently, until it becomes translucent and then lightly browned, then add the diced ham. Cook, stirring, for about 1 minute more. Add the peas (if using thawed frozen peas) to the pan and cook for 5 minutes over medium heat, stirring occasionally.

Stir in the cream, salt, peas (if using fresh cooked peas), a pinch of freshly ground nutmeg and a very generous helping of black pepper. Raise the heat to high and continue cooking, stirring frequently, until the cream reduces and forms a thick sauce.