Cover the pan and cook for about 10-15 minutes. Stir about every 5 minutes and check if cooked. The pumpkin is cooked when you can easily mash it with a spoon.
When the pumpkin is cooked turn off the heat, add the sugar and mash it well with the end of the spatula.