( CNN ) -- Roger Federer has told CNN he may make another attempt to win the Olympic singles gold medal he craves in Rio in four years ' time . The world No . 1 was pipped to the London 2012 crown by Britain 's Andy Murray -- the man Federer beat to secure his seventh Wimbledon title just over a month ago . The 30-year-old has won 17 grand slams in his illustrious career and took gold in the doubles with Stanislas Wawrinka in Beijing four years ago , but he has failed to win the singles title in four attempts . Despite the disappointment he felt at being brushed aside 6-2 6-1 6-4 by Murray and missing out on topping the podium , Federer did at least claim his first solo medal . `` I 'm not sure yet , it 's four years away . I can retire in the meantime and come again ! '' Federer told CNN about his hopes of an Olympic appearance in Brazil . `` But I 'm not going to do that , I 'm going to keep on playing . I hope I can do it . I 'm turning 31 in a few days , so I 'll be 35 for Rio -- I think it 's possible but we 'll see how it goes . '' Murray conquers Federer to take Olympic gold at Wimbledon . A gold medal would have capped a perfect month for Federer , after his victory at Wimbledon catapulted him back to the top of the world rankings . And once the bitter sting of defeat on Centre Court had subsided , Federer insisted finally getting his hands on a singles medal tempered the disappointment of his straight-sets loss . `` I 'd have to say I was very disappointed for three to five minutes , '' he said . `` I was in a little room waiting for the ceremony , I saw Del Potro and Murray and I saw how happy they were for gold , for bronze . `` Of course I 'd just lost my match where Del Potro had to win the bronze over Djokovic . So I was in the middle and I was the only one who 'd lost that day . `` I thought , 'Hmmm , I could either be sad right now , extremely sad , or extremely proud and happy , ' and I chose to be extremely happy and proud . `` It was a dream summer for me . I won Wimbledon and I returned to world No . 1 and I tried everything I could to win Olympic gold , and I just came up against a better player on the day . `` So for me silver is the maximum I could get out of the Olympics this time around . I was just extremely happy , like a little kid there on the podium . '' Supreme Serena crushes Sharapova to achieve the Golden Slam . Murray 's victory offered the Scot recompense for his heartbreaking defeat in the Wimbledon final -- the first time a British male had reached the showpiece event since 1938 . The 25-year-old beat former world No . 1 Novak Djokovic on his way to the final , and also claimed silver in the mixed doubles with Laura Robson . And Federer paid tribute to his rival for winning his first major tennis title less than a month after losing his fourth grand slam final . `` I thought he played great , '' Federer said . `` What a champion , to come back from losing in the finals of Wimbledon , resting , preparing . `` With the pressure , okay he had home advantage -- you can see that as an advantage or a disadvantage -- but for him to come back and win the Olympics , people sort of expected him to maybe do that . Why Federer 's friend flew the Swiss flag . `` But he came through Djokovic and through me , who he lost to at the finals at Wimbledon , that 's the sign of a champion . `` I always knew he had it in him but it was good to see he did n't let his head hang and was disappointed and upset and sour about his loss at Wimbledon . `` He should have been proud of it and that 's what I told him then . I hope he enjoys this victory like he should because it was a big victory for him . '' Federer survives marathon semifinal . Federer admitted his challenge for the gold was dampened by his marathon semifinal against Argentina 's Juan Martin del Potro -- the longest in Olympic history at four hours and 26 minutes . The deciding set was eventually won 19-17 by Federer but the Swiss refused to blame tiredness for his lackluster performance . `` I missed a lot of opportunities , I think I made zero of nine break points and he made four out of 10 . We were n't that far away from each other but he pulled away , '' he said . `` I think with the crowd he got momentum and it was hard to stop . Maybe emotionally I was a bit drained , or physically a bit slow at times after the Del Potro match , but I had a day to rest so no excuses , he was the better player on the day . `` I have regrets , a little bit , but I tried everything I could but it was n't enough . ''
World No . 1 Roger Federer wants to compete at the 2016 Olympics in Rio . Comment: The Swiss has competed in four Olympics but this was his first singles medal . The 16-time Grand Slam won doubles gold with Stanislas Wawrinka in 2008 .