Townsend has signed a short-term contract until January at Luton after his contract at Everton expired in the summer.
It had been a strenuous search for a new club having just recovered from an ACL injury, which has forced him to miss 18 months of football.
The 32-year-old told talkSPORT that he had offered himself to clubs across the country, Europe and even the Middle East before Luton took a chance on him.
And while he would not retire officially, he also realised that the longer he went without a club, the more difficult it would be to come back.
Speaking to Andy Goldstein and Darren Bent on talkSPORT Drive, Townsend said: "It did come to a point where we are, in October now, I felt like my time might have gone.
READ MORE ON TRANSFERS
Messi to Saudi Arabia hits logistical snag as Ronaldo reunion thrown into doubt
Bayern chief lets slip exact transfer fee they paid Tottenham for Harry Kane
"I started doing media work, working with Sky quite regularly and what have you.
"People were saying 'wait until January, you might get a chance in January'.
"The problem is, if they didn't want to take a look at me after not playing in 18 months, what is another six months? You are talking two years.
"So I would never officially retire but I feel like my time may have gone but hugely grateful to Rob Edwards and Gary Sweet, the chief executive at Luton.
Most read in Football
Former Tottenham and Newcastle star signs for Luton Town on short-term contract
Ryan Reynolds and Rob McElhenney mock Billy Sharp for getting so triggered by Wrexham
Winger 'destroyed' Alexander-Arnold but free agent despite stunning Rangers teammates
Messi wanted me at Barca after 'best ever goalkeeping display' and I'll never forget it
"First and foremost, for taking the chance and wanting to see me and secondly, for offering me a short-term contract.
"They believe in me and they believe I can help the group, I am so desperate to repay that faith."
Townsend joins a side in desperate need of an oomph as they struggle with life in the Premier League.
A dream promotion from the Championship did not give their fans any illusions that the top tier would be anything less than unforgiving.
But one win in eight matches has left the Hatters 17th in the table, a position they would almost certainly take at the end of the season if it was offered to them.
With the arrival of Townsend is a player who has played in the Premier League for most of his career, and understands the division.
Luton boss Rob Edwards has some fine young players, most of whom have proved their worth in the Championship.
But the Premier League is a different beast and only Ross Barkley, Marvelous Nakamba, Tim Krul and Albert Sambi Lokonga have any real experience of it - and with varied levels of success.