Quite a long time if the companion was loved. To many people don't feel cats love. They do. And when a companion dies, they can grieve for quite a long while. The best thing to do is to get a kitten. It doesn't replace the companion, but it can take the cat's mind off of grief and give her a new companion to enjoy. It will take some time for the cat to accept the new kitten, but it will happen. Though, do try to get a mellow, gentler kitten.