add TimeCounter class