Dogs don't sweat, and they don't have an efficient way to cool themselves down. If they are panting, it may be because they need the oxygen because they've been exercising, or it may mean they are trying to get rid of built-up heat in their bodies. Long coats also hold in body heat. Clipping the dog's coat a little shorter for summer will also help to keep the dog cooler. Be sure not to shave the dog, though, because that could lead to sunburn, which would be very painful for the dog.
Black dogs absorb the sun's rays, so they get hot more quickly than lighter-colored dogs.
It is impossible to give specific recommendations on how long dogs can be out in the sun exercising. There are so many variables, depending on the physical condition of the dog, its age, its coat length, its breed. The owner also must take into account the age of the dog and any health problems it might have. Very young or very old dogs are more at risk. Breeds like pugs and Pekinese have more difficulty in the heat because of their facial shape.