Just wagering a guess, but presumably to synch their clocks to a known good time?
Ships also used Greenwich Mean Time (which this cannon is tied to) and astrological data for local time (which this cannon also used for its time).
Also, as suggested by others (I should have thought of that!) - ships used chronometers to establish their longitude.
(At 56 degrees north, which Edinburgh lies on, a timing error of a second translates into 18 meters or so - an order or two of magnitude below the accuracy of even the best of celestial navigators - but still, might as well make the starting conditions as good as possible.)