When pain is acute, sharp, inflamed, limping in dog or person. Use Ice 20 min on and 2 hours off. In dogs in should only be cool to touch. Inflammation is an increase in blood flow and when it is acute you do not want to increase blood flow thus anti inflam medications. So many Vets and MDs tell patients to use ice for 24 to 48 hours then heat but give them anti inflam meds past 48 hours. The heat increases blood flow which is what you do not want thus anti inflam meds. So use ice for as long as the pain is sharp or swollen or inflamed. Only use heat when pain is dull throb like in people and when dog is no longer yelping when touched.