You've got 1.5-2.5 hours of fuel in your body; more likely less if you are riding hard. I'd eat a bar after the first hour and then every hour or so after that. Riders in better shape than me will eat more as they burn calories faster. Also depends on how hard you are riding. The important thing is to keep carbs in your system so you don't bonk. On a three hour ride of flats, rolling hills, and maybe a long climb, I'm avg. ~15 mph with a cadence of mid-90's on the flats, 80's on the hills, and whatever I can muster on the long climb. I eat a bar after an hour then maybe another before I stop. Then I've got a Luna or Zone bar in the Element to eat as I'm riding home, along with more water. I will have drunk a bottle of water and a bottle of Accelerade.
After the ride, you need to eat something so your body can replenish the muscles with fuel. Otherwise, your muscles might start eating themselves. I kinda doubt I get to that point but as I don't want to lose muscle; I'm not taking any chances. So I eat the bar right after I stop.
__________________