This uses a timer tick and adds and subtracts to counters. Their units are now time related.
Also poll input looking for changes to reset the counters
Uses JavaScript. Do view source to find out how it works. Doug Rice, Copyright 2010