Length of board with 2 nails at the distance apart you want your hooklength. Tie the hook and catch it on one nail. Bend the line round the other nail and hold the doubled line and tie your loop. Should be the same length every time.
I actually use a variation of this with one nail and distances marked on the board. I then catch the hook on the nail and hold the doubled line and slowly extend the length until the loop is level with the mark I want and then tie off. I certainly get within a 1/4 inch each time.
Once you have tied the hook you place the hook around the peg in the preston hook boxes or like as mentioned before use 2 nails in a piece of wood . Then run the line around the other peg and grip both starnds so this forms a loop around around the peg . Keep gripping where you have piched the line and tie the loop knot and you will find once tied this is the excact length of the pegs .