Merlin Hughes <merlin@merlin.org>
Ruthlessly adopted and adapted from Nat Friedman's battery monitor.
