Why does time seem to fly when we are having fun?

You're deep in your favorite game, building the perfect fortress, dodging enemies, laughing with friends — and suddenly your mom calls you for dinner. Wait, what? It's been two hours? It felt like twenty minutes. But when you're sitting in the dentist's waiting room, five minutes drags like an eternity. What's going on with time?
Here's the secret: time itself moves at the same speed always — one second per second, steady as a drumbeat. But your brain doesn't experience time directly. Your brain builds a sense of time by watching how many new memories you're making. More memories packed into a stretch of time? Your brain thinks, "Wow, that must have been a long time." Fewer memories? "That flew by."
