A simple JavaScript time counting class