Dunno bout no Patrick O'Brian etymologies. When I was in the Navy they said it was a corruption of docked watch with dock in the sense "to cut short." Its purpose was to allow people who would have the 1600 to 2000 watch to eat dinner, which was served from about 1700 to about 1900. People who had the second dog watch would get early chow line privileges and could eat and relieve those on the first dog watch in time for them to eat.