Just before the start of Wimbledon in late June, Roger Federer recalled a conversation about retirement that he had with Pete Sampras a decade ago.

"He was wondering how much longer I had in the tank. This was when I was just hitting 30," Federer said. "He was thinking I was coming towards the end or something, just because it was, for him, normal that at 31, 33 — with the career that we’ve had, with all the sacrifice, in a way, you have to go through — it’s hard to keep on pushing for more years on tour."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Federer, who turned 40 in August, went on to explain that he never thought he’d still be going at this age, especially after a series of knee operations. With Wednesday’s news that not only will he sit out the Australian Open in January but also expects to miss Wimbledon in 2022, the notion that Federer really might not have many — or perhaps even any — high-level performances left in him becomes all the more real.

To his fans, to his sport at large and, most importantly, to the man himself.

"Even if I know that the end is near, I want to try and play some more big matches. That will not be easy, but I want to try," Federer said in an interview published in the Tribune de Genève newspaper.

"Let’s be clear: My life is not going to fall apart if I don’t play another Grand Slam final. But that would be the ultimate dream — to get back there," he said. "I want to see one last time what I’m capable of as a professional tennis player."

That is a sentiment surely shared by plenty of others.

Count Novak Djokovic among them.

"Obviously, Roger is an icon of our sport, and people around the world love him. They love watching him play; they love seeing him around. He is very important for our sport, on and off the court," Djokovic said Wednesday in Turin, Italy, where he is competing at the ATP Tour Finals. "So for the sake of our sport, I sincerely hope that we can see him play, at least another time."

Federer, who shares the men's record of 20 major singles championships with Djokovic and Rafael Nadal, has not competed since undergoing surgery on his right knee for the third time in 1 1/2 years. That procedure to repair his meniscus and cartilage came not long after Federer lost 6-3, 7-6 (4), 6-0 to Hubert Hurkacz in the quarterfinals on July 7 at Wimbledon, where he has won eight titles.

Federer was physically compromised that day against an opponent never previously past the third round at a Slam. That was only the third 6-0 shutout handed to Federer in 429 Grand Slam matches.

That’s why, in the interview published Wednesday, Federer said his fans "deserve better than the image left during the grass-court season," even if he also figures, correctly, that the lasting memory of his play would be his triumphs and "how they felt watching me play," rather than the stumble against Hurkacz.

He acknowledged he needs to be patient as he works to recover and rehabilitate, drawing a distinction with 2016, when he missed half a season following an operation on his left knee, then won three of the first four majors he entered after returning.

As of now, Federer is aiming to be able to jog in January and resume tennis work two or three months after that.

"I’m sure that he doesn’t want to end his career this way. I think he’s going to definitely going to try to give it the last push," said Djokovic, who eclipsed Federer’s record for most weeks atop the ATP rankings and Sampras’ mark for most years finished at No. 1. "For everything that he has achieved and created for this sport, he deserves to play and he deserves to have a proper farewell."

CLICK HERE TO GET THE FOX NEWS APP

As the long-ago chat with Sampras (or, as Federer calls him, "Pistol") illustrated, people have been asking the Swiss star forever about how much longer he plans to play.

"We would all like that I could say goodbye in my way and on the tennis court," Federer said, adding: "In absolute terms, there’s not a right moment to leave. Just the right moment for each athlete."