How long to cook 500g of boneless pork leg?
I highly recommend you invest in a meat thermometer. A quality one such as a thermapen. Probe thermometers (link to review site) are a very useful tool as well.

Roasting meat is not a as much a question of time, but of temperature. You are tying to cook pork to a temperature you desire: maybe 60 C (140 F) or 70 C (160 F) depending on your desired taste and recipe. How much time that will take is a function of a number of factors, including the cooking method, oven temperature (if you are roasting), and the size and weight of the pieces being cooked (something you did specify). Having a thermometer to measure the internal temperature will tell you much more about when the meat is done than how much time you are cooking it.