Time has permeated our society. Most people wear watches, or have cell phones to tell them what time it is. They get stressed out over ten minutes and punctuality is a virtue (one I absolutely don't have), but secondary fantasy worlds are often set in lower-tech environments. (I don't think they need to be, but generally if there's more than modern tech it's called science fiction, one way or another.) So how is time measured in lower-tech settings?
The first time keepers were the sun, stars and moon, of course. Their journeys across the sky and through their different cycles were, for a long time, the very definition of "time." Days are still the amount of time it takes the earth to rotate, months are still 28 -31 days as they were when they were based on the lunar cycle, and years are still the length of the earth's trip around the sun. These are the things that help us define time. The Mayans relied on the movements of the planet Venus through the sky to develop their yearly calendar, and in 3100 BC, the ancient Egyptians based their year around the "Dog Star" (Sirius) because it rose next to the sun every 365 days, around the time that the Nile began to flood.
Most interesting is that the need to know what hour it was doesn't seem to have come up until societies began to become more formal and organized. Urban societies were more in need of clocks than rural ones because bureaucratic governments, organized religions, and formalized social activities required more precise daily time keeping. In fact, much of the early clock work was done at and by monasteries.
The sun clock started with the obelisk being one of the first forms around 3500 BC. However, sun clocks require the sun, so it wasn't the only heavenly body used to measure time. Around 600 BC, the Egyptians developed the merkhet, which was an astronomical tool for measuring the movement of the heavens, and therefore time. By aligning it with the Pole Star they could mark off night time hours by noting when certain stars crossed the meridian.
Different cultures used different forms of sundials, from the flat, vertical kind to more elaborate ones such as the hemispherical dial. Since each culture had its own method of time keeping, it's not surprise that they also had their design preferences.
The earliest waterclock that we know of was found in the tomb of Pharaoh Amenhotep I, who was buried around 1500 BC. Waterclocks don't depend on visual observance of the movements of celestial bodies, but they also don't always operate consistently. In cold weather, they can slow or freeze and the flow of water can be hard to regulate.
The Greek clepsydra of 325 BC consisted of a cylindrical tube or bowl with a hole at the bottom and another bowl beneath it. Water dripped from the top container into the bottom one at a pretty constant rate and the level markings of the bottom bowl told how many hours had passed. This is a very simple version of the waterclock, and later mechanized versions from between 100 BC and 500 AD were more sophisticated. Some rang bells or gongs and others were made with small doors or windows that would open to reveal model figures.
In 1088 AD, Su Sung created a 30 foot tall waterclock tower. It sported a rotating celestial globe powered by hydraulic pressure, as well as five stages which opened to display different manikins which rang bells and held tablets which told the hour.
There was little change in the mechanics of time through the European Middle Ages, but in the 1300s mechanical clocks graced the clock towers of major cities in Italy. Though mechanical, these clocks were driven by weights and regulated by verge-and-foliot escapements. However, they were still somewhat difficult to regulate. In the 1400s Peter Henlein invented the spring-powered clock. This made it possible for clocks to be smaller and more portable, fitting on a shelf or a table, or even fitting in a pocket. However, they ran slower as the mainspring unwound. In the 1500s, this portability created a boom in the demand, and their proliferation also tied people to the need for time pieces. The first pendulum clock was built in 1656 by Christiaan Huygens, although it was conceived of by Galileo some years before.
I'm stopping here for now, but I'm also planning on a post about how to address all of this in a fantasy worldbuilding context. Fun! :-D