If he is limping, he is in pain. If he has trouble settling, he is probably in pain. I lost two in one year from osteo, and one a few years ago. The first one was a surprise. He was eight, with a limp that would come and go. We treated him for a sprain, but he got better for a few weeks. By the time we got confirmation, he had cancer throughout, and I let him go at that visit. Other than the limp, he appeared fine.
The next was a nine year old who developed that same limp. The bone didn't look too bad, so I took her home on lots of meds.that lasted three days, because I couldn't stay ahead of the pain. She was still eating, and got excited when I came home. She was just in so much pain.
The next one was a twelve year old who developed that same limp. I took her home, but she lasted just over a week. She was eating, but panting, pacing, standing because it hurt to settle down, and just miserable. Some of it was a reaction to the tramadol, but she went downhill in a matter of a few days.
I live in a small house, have several large, active dogs, and a doggie door. I would come home at lunch to check that all was well, but had such a fear of finding a dog in agony from a broken leg. A dog lives in the moment, not knowing that it has a terminal illness. He only knows that he is in pain, but wants to continue to please you, no matter how hard that becomes. I would never want another dog to have such a terrible last few days as my last two. With both, the end just came so fast. I just kept trying one more day with stronger pills, hoping for the best that didn't happen. With both, they had a horrible last night. I was up all night holding them and crying until the vet came in the morning. I hope that you don't get to experience that. I will never do that again!
I would never have kept trying with the last dog if I had not seen my friend manage her dog's pain for months. I kept hoping that I could get to that level of comfort with my dog, but it didn't happen. I wish that I had just let her go with dignity a few days earlier. In hindsight, I know that I wouldn't have been jumping the gun!
I don't know your situation, and I'm not trying to give you advice. I'm just sharing my experiences to give you food for thought. Please make your decision based on your dog, family, finances, and situation, and don't look back! I hope you can make a decision that won't leave you awash in guilt. I felt guilt after the first one because I didn't take him home and try, but now realize that I did the right thing. I still feel guilt over my decision with the other two., and it has been over six months. Enjoy the time you have left. I wish you peace as you struggle with your decision. Hugs!