Textbooks are always best to sell as soon as the class is done, otherwise they will likely be obsolete. I sold almost all my nursing school books as soon as the classes were done, and since I bought most of them used and I kept them in great condition I got most of my money back. Once you are a year out, forget about making any significant money on them.
You might have up to a month or so to recoup your money with modern fiction books, once you get past that there are enough people re-selling them that it likely won't earn you anything. Non-fiction might give you a little longer depending on the book. Your best bet is either selling them in lots on e-bay, people sometimes pay more for the convenience of getting an entire series at once, or a bunch of books on similar topics, plus you will save on shipping, or giving them away on a website like Paperbackswap.com and then selling the book credits for cash.