added a utility class: TimeCounter.