Time “keeping” is simply a matter of counting cycles or units of time. A clock is what does the counting. In a more strict definition, a clock also keeps track of its count and displays what it has counted. In a broad sense, the Earth and the Sun are a clock -the commonest and most ancient clock we have, and the basis of all other clocks.
A sundial is a clock and human beings since antiquity has required timing. Among the most fascinating remains of many ancient civilizations are their elaborate time-watching devices. Great stone structures like Stonehenge, in Southern England and the 4000 year old grave of Newgrange, near Dublin, Ireland, that have challenged anthropologists and archaeologists for centuries, have proved to be observatories for watching the movement of heavenly bodies. Antedating writing within the culture, often by centuries, these crude clocks were developed by primitive peoples on all parts of the world. Maya and Aztec cultures developed elaborate calendars in Central and North America. Scientists even today find new evidence that some stones laid out in formation and that formerly thought to had only a religious significance, also, for the cycles of life -the rise and fall of the tides, and the coming an going of the seasons- powers that literally controlled the lives of primitive peoples as they do our own, naturally evoked a sense of mystery and inspired awe and worship.
Astronomy and time -so obviously beyond the influence or control of man, so obviously much older than anything the oldest man in the tribe could remember and as nearly "eternal" as anything the human mind can comprehend- were of great concern to ancient peoples everywhere.
When ancient peoples put a stick in the ground to observe the movement of its shadow from sunrise to sunset, it was fairly easy and certainly a natural step to mark off “noon” and other points where the shadow lays at other times of day –in other words, to make a sundial. Sundials can tell the time quite reliably when the Sun is shining. But, of course, they are of no use at all when the Sun is not shining. So people make mechanical devices called clocks to interpolate or keep track of time between checks with the Sun. The Sun is a sort of “master clock” that served as primary time scale by which the man-made, secondary clocks were calibrated and adjusted.
The sundial is the oldest known device for the measurement of time and the most ancient of scientific instruments. It is based on the fact that the shadow of an object moves from one side of the object to the other as the Sun “moves” from east to west during the day.