he apparently lost the thread of the sermon during the religious service , and his errant and inventive mind came up with what was the most common means of measuring time until well into the twentieth century .