How does the 4th generation iPod Shuffle know what time a song was last played? Synching my iPod Shuffle (4th generation) updates the Last Played column in iTunes, and it looks as though the updated value matches closely to the time I played the song on the Shuffle.  But ... how does the Shuffle know?  Does it have a clock?  If it has a clock, does it have other stuff?
You can find some information about the guts of an iPod Shuffle here.
Also because the selling point of a Shuffle is price (and portability) while still maintaining the Apple quality I don't think Apple would put much more components into it than what is absolutely necessary.