As the sugar melts it becomes a loose paste. Keep stirring constantly and cooking until the mixture becomes thick and it leaves the sides of the pan. It took me about 6-7 minutes.
Now add cocoa powder. Mix well and cook for a minute, turn off the stove.
Remove it to a plate and let it cool to touch (warm).
While it is still warm, divide it into 8 equal portions and start shaping into a smooth patty (peda shape).
Add chopped pistachio in the center and lightly press it into the chocolate peda so they stick to it.
Do not overcook the khoya mixture otherwise, chocolate peda will become chewy.
Cooking time may vary depending on many things - the quantity you are making, size of the pan, flame intensity, etc
You can double, triple the amount.
Storage: It stays good for a day at room temperature and up to a week in the refrigerator in an airtight container. Store in a single layer or keep parchment paper between layers if you want to stack them.