If you're holding a snake, and it's not flicking it's tongue, it's probably resting. Typically they will flick their tongue at first to see what's going on, then they may stop.

The purpose for a dolphin to only have one half of the brain sleep at once, is because of the fact they need to regularly breathe. The one half is awake for the purpose of rising to the surface to breathe, while the other half rests. Dolphins are in fact in this state approximately 8 hours a day.. like we do. (sort of)