The Egyptians had ten hours of daylight from sunrise to sunset (exemplified by a sundial described in 1300 B.C.E.),
two hours of twilight and twelve hours of night.
The calendar year was divided into 36 decans, each ten days long, plus five extra days, for a 365-day year. Each decan corresponded to a third of a zodiacal sign, and was represented by a decanal constellation.
In the summer sky, the night corresponded to about twelve decans, although half a day would correspond to eighteen decans. This led to the division of the night into twelve hours.
The first hours were seasonal in that their length varied with the season. (Note that this system was also used in oriental clocks.) Later, Hellenistic astronomers introduced equinoctal hours of equal length.
The Babylonians (about 300-100 B.C.E.) did their astronomical calculations in the sexagesimal (base-60) system.
This was extremely convenient for simplifying division, since 60 is divisible by 2, 3, 4, 5, 6, and 10. The first
fractional sexagesimal place we now call a minute, and the second place is a second.
Sundials were one of the earliest forms of telling time. One of the first ancient people to use sundials were the Sumerians. Sundials contain 3 parts: a circular dial, a needle, and a style (gnomon) to keep the needle in place. They divide the day into 12 parts and each part is about 2 hours long. People measured the length of shadows to determine how much time has passed. No one really knows for sure why the Sumerians kept track of time; maybe it was for religious purposes.
The Egyptians also divided the day into 12 parts. They used huge granite columns called Cleopatra Needles to keep track of time periods. They had 12 marks on the ground that equalled 12 parts of the day. When the sun touched the top, a shadow was created and the length and position of the shadow told the Egyptians how much daylight remained.
The Romans divided time into night and day. According to the writer Pliny, criers announced the rising/setting of the sun. In 30 B.C, the Romans stole Cleopatra's needle but were unable to adapt. A man named Al-Battani knew something that the Romans didn't: the gnomon had to point towards the North Star, and length and size of the gnomon varied with the distance from the equator!
The issue here is that Cleopatra's needles were inconvient and impractical for the average person. Sundials were also dependent on the weather; they would be useless on a cloudy day, and the winter and summer shadows would not correspond with the markings. In addition, in order for the sundial to work correctly, it had to be positioned correctly.