As for how long, etc...
A few years ago, I lost one of my cats. She started getting sick in Late March, and we thought it was due to the China pet food scare since both she and her buddy were sick. Tons of tests later, and they couldn't find anything wrong. So we assumed it was the food. But, she kept losing weight and would walk for a bit, then lay down like she was winded. So I took her back and they did xrays to see if she had a lung infection. The vet was speechless. She had lung cancer- two golf ball sized growths in both her lungs. Lung cancer is extremely rare in cats, and to this day, I can still see the look on the vets face when he told me. I, of course, started crying yet Dusty just sighed, as if she was saying, 'now they finally know'.
I asked the vet how long, how will I know, etc. All he said is, she will let you know.
And he was right.
Around two weeks later, Dusty was sleeping on my bed with me. She didn't sleep much though, which meant I didn't sleep much either since I was so worried about her. Finally, around 6am that morning, I turn and asked her how she was. She just looked at me, put her paw on my hand, and rested her head on her paw. It was time. She let me know.
I said goodbye to Dusty later that day.
Animals are amazing creatures and I truly believe they will do everything they can do to spare you sadness. So whatever you do, whatever your choice, for all the years of love and companionship your cat has given you, be there for him and make sure yours is the last face he sees before heading to the rainbow bridge. It is the least we can do for the unconditional love they have given us.
My kitty does this exact same thing. He has lost a lot of weight. He only weighs 8lb 3 oz. He just walks a few steps and lays down.