Sadly, a time gun isn't what I, as a science fiction fan, initially thought it was.
However, it is nonetheless kinda cool. A time gun is apparently a cannon or other piece of artillery that's fired every day at a specific time, to allow people nearby (including passing ships) to set their clocks accurately. An early form of network time server, I suppose.
One problem with using sound as a time signal is that sound is relatively slow. The niftiest thing I found when I looked up “time gun” is an 1861 Edinburgh time gun map, showing “the time taken for the sound of the one o'clock gun to travel from Edinburgh Castle to different parts of Edinburgh and Leith” (as the website puts it).