The clock code is a method of mentally computing the sine of an angle between zero and sixty degrees. Pilots sometimes need to do this to estimate the heading correction due to the wind, and sailors may find it useful to do the same thing to allow for the current due to the tides.
The basic assumption is that for angles up to around 60°, it is adequately accurate to assume that sine(A) = A, when A is expressed as a fraction of 60. Thus, the sine of 30° = 30/60 = 1/2 = 0.5.
The clock code is a further method of visualising fractions of 60, since we are very used to expressing fractions of an hour (60 minutes) when telling the time.
Thus:
The angle is the angle of the wind or tide as it presents itself relative to the ship or aircraft, so if the wind is coming from the left at a relative angle of 30°, we use a sine of 0.5. Once the sine has been estimated, the drift due to wind or tide can be estimated accordingly by resolving the velocity of the wind or tide into a forward component and a sideways component. The sideways component is the windspeed x the sine, and the forward component is (1  the sine) x windspeed (i.e. the cosine). Naturally we must apply these corrections to our groundspeed in the appropriate direction according to logic  a wind from the left will blow us off course in that direction; a headwind will slow our progress, a tailwind will increase it. Converting this back to a heading correction can be done using the 1 in 60 rule.
For wind angles greater than 60°, it is adequate to assume it's at 90°, i.e. a side wind.
More accurate corrections are done when possible, but in the particular case of a VFR pilot mentally calculating an unexpected diversion, using tables or the E6B slide rule in flight is usually not an option, so the clock code is one method of handling the required calculation without excessive error. In practice the wind strength can only be guessed or based on earlier reports, and the error due to the sine calculation will usually be much less than that due to the wind itself. Fine tuning of the heading can be done en route using the usual methods for doing so.
