it isnt just about whether the animal is in pain but 'quality of life' having your animal put to sleep when the time is right ( and only you can judge when that is) is the last kind thing that you can do for your furry friend.
I had a dearly loved cocker spaniel, who was blind quite deaf and had arthiritis, she was nearly 16. I looked after her very well, carried her to the garden to go to the toilet several times a day, didnt leave her own for long, gave her pain killing drugs every day etc; She seemed happy and was still eating okay, but the dreaded dilemna was never far from my mind, she eventually had a stroke early one sunday morning, but seemed to recover, but we took the decision to have her put to sleep and had it done within the hour, before we could change our minds. We were grateful that we were able to be there with her at the end. In hindsight, I should have done it for her about 6 months earlier, I was in denial and kept thinking that she would perk up, but lets face it, as they get older, every day brings them nearer to the end, time doesnt move backwards.