Star Control 2 is a rare exception in my opinion. But there were a lot of good things about that timer:
It was a *lot* of time, honestly.
Yet it wasn't pointless, because it started having effects long before the "end". Races both near and far would start mentioning how worried they were, with increasing alarm. I'm pretty sure it's the root cause of the Pkunk migration, which happens very early and shows the player that the galaxy isn't static- the zones of control can move, and they flash helpfully when they do. And it means something important is happening.
You also get some significant reprieves on said clock by exploring and making allies - your official "mission". Not to mention better and better info on what the threat *is*, and exactly how it might be stopped.
And if you still get low enough on time... You actually get rewarded for *that*. You can skip several potentially-lengthy quests by letting the bad thing start, and scooping the macguffins off the ruined planets. There's some uniquely tragic dialogue, too.
(Reminds me of an UT genocide run, particularly since you really have to go out of your way to wait that long)
So I think that's an example of it done right, though it's much more than a simple timer. It's more that the main quest progresses on its own, and tries to convince the player to join in.
I also liked the idea of the 2 bad-end timers in Fallout 1, though apparently it might not have been in the version I played. But I've always had the unusual opinion that Fallout shouldn't be a series about settling down in safety.