If it's your first time, may take longer time. It also depends on which terminal you will transfer to. For BritishAirways, they use terminal 4(or5, new terminal), and you have to get to terminal 3(by Underground) if you switch to other airlines.
Well, if you are familiar with London and London Underground, it may be ok to visit Buckingham Palace, and walk to Westminster Abbey and Big Ben,which is on the riverside, y (you can view Thanmes River and London Eye). Buckingham and Westminster Abbey are good place and worth a visit.
If you still have time, you can walk to Downing Street 10, and then Trafalgar Sq. Finally if you are fast enough, you can run to China town to have a feed.