The apparent movement of the Sun and stars against the canopy of the heavens was the first clock available to humanity for measuring the passage of time. The alternation of day and night marked the pace of life. Thus the time elapsed between two successive transits of the Sun over the meridian—in other words, the median solar day—became the basic unit of time. Its division into 24 hours of 60 minutes, in turn subdivided into 60 seconds, then became a scale of intervals used as a benchmark for constructing timekeeping devices. The water clocks and sandglasses still in use on ships of the fifteenth and sixteenth centuries were calibrated to indicate precise time intervals, typically the half-hour segments of the watch (that is, the period when a part of the crew was on duty to keep the ship on course), and the periods of 30 seconds that served to estimate the ship's speed by counting the knots on the chip log. The true timekeeping instruments, however, were the mechanical clocks that were coming into use in medieval convents in the form of small alarm clocks and tower clocks. They functioned by means of two mechanisms: the pendulum or balance wheel, which performed the periodic motion, and the escapement, which counted the pendulum's movements. The regular oscillation of the pendulum or balance wheel determined the speed of advancement of a toothed wheel that transmitted energy to a gear train and thus moved the hands of the clock. The pendulum clock, introduced by Galileo (1564-1642), was perfected in 1656 by Christiaan Huygens (1629-1695), who changed the oscillating movement from circular to cycloidal. This transformation made it possible to preserve the property called isochronism, in other words, the equal duration of the pendulum's oscillations. The measurement of time played its most decisive role in the calculation of longitude, which was determined by the difference between local time and the time at the port of departure.