in reply to Countdown program

Here's a program that already does it:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/nms-cgi/countdown/

That's part of the nms project (run by davorg and gellyfish, among other people).

Even if you're looking to write your own, it's worth studying how they've implemented it.

- Matt Riffle