Maybe it would be a nice idea to redraw the text when it actually needs to be redrawn (right now it redraws even without any needs)? When some stats have actually changed accepted/rejected shares counter has increased or mhash/s performance has changed (with the given accuracy, like, 300 became 299 or so).
Yeah, I'll need to make another global constant then

, which I really don't want to do. I'll just make it refresh every half/one second or something.
I guess that the problem is this: a pool
is responsive to pings, but however (for any reason) it cannot offer you any mining work, so miner is idle. And your program decides to keep trying to mine here and not making an attempt to switch pools. Am I right on this?

Yeah, still can't figure out a better way of checking if pool is down or not. So, it's either ping or checking for share acceptance rate, unless someone comes up with a better idea, preferable one that doesn't need separate implementations for different pools.