Add a new constructor of TimeCounter.