I would like to time the knocks themeselfs.
Perhaps you should draw a picture that shows what you think a knock looks like, and illustrate on the picture what you want to time.
Think about knocking on a door. The time that your knuckle is in contact with the door doesn't really make any difference to someone hearing a knocking sound. It is the pattern of knocks - the time between them - that makes for a secret code.