West Ham midfielder Gary O'Neil says spending time on the sidelines made him think about where his future lies once he retires.
The 29-year-old missed eight months of last year after suffering a serious ankle injury.
"While I was injured I started my coaching badges, just in case," he told
BBC London 94.9.
"It was hard to make myself do it because you are preparing for something you don't want to happen."
The former Portsmouth and Middlesbrough player had to undergo surgery on an osteochondral defect after sustaining damage to his cartilage in April 2011.
He suffered the injury after a tackle from Aston Villa midfielder Nigel Reo-Coker.
O'Neil continued: "When you're a footballer, you say 'I'll stop when I'm 35'.
"When you're only 29 you think you're miles away from stopping.
"One minute you're running around freely and playing in the Premier League and a second later you can't to it any more.
"There was a spell after five months when I was trying to run and it was too painful. It was that point when I thought I might not get back."
O'Neil says his ankle problem was the most serious injury he has had since making his debut for Pompey in January 2000.
"It was quite painful and I couldn't walk on it," he said. "But I thought it was bad ligament damage or I might have cracked it.
"I didn't ever think my career might be threatened by it.
"The guy who did the surgery had only done about two before and he's been operating about 15 or 20 years.
"It was a big shock and took me a while to come to terms with it.
"It was really rare. I've been lucky it's all moved on so well and I've managed to get back out there.
"I know a few boys who have had to retire though injuries. It must be very tough to deal with not making it back."
Despite starting his coaching badges while out of the first-team picture at Upton Park, O'Neil also harboured ambitions of playing golf professionally.
He plays off scratch and
attempted to qualify for The Open earlier this summer.
Gary O'Neil career factfile
(trainee-August 2007): 192 appearances, 17 goals
(loan spell Sept-Oct 03): seven games, no goals
(loan spell Sept-Nov 04): nine games, one goal
(Aug 07-Jan 2011): 120 games, nine goals
(Jan 11-present): 31 games, two goals
"I didn't do great," he said. "I played ok but I went to enjoy it and it was good experience.
"Being realistic, I'd go down the coaching role [after retiring] as I love football.
"I'd like to try and help people improve and stay in the game as long as I can."
O'Neil has made two appearances for the Hammers this season in the League Cup and says he occasionally feels the effects of the injury.
"The ankle still needs some managing so I still have to stay on top of it with the physios," he said.
"When I get a knock on the ankle it gets sore for a couple of weeks. You panic and think I don't want to go through all that again.
"All the little knocks have repaired themselves and I've been able to carry on."