Implemented time measuring