add time counter class, that uses for calculating the time consumption.