It is believed that our 24-hour day comes from the ancient Egyptians who divided day-time into 10 hours. They measured time with such devices as shadow clocks. Also, they added a twilight hour at the beginning and another one at the end of the day-time period. Night-time itself was divided into 12 hours, based upon their observations of the stars.

In the Egyptian system, the length of the day-time and night-time hours were unequal and varied with the seasons. In summer, day-time hours were longer than night-time hours while in winter the hour lengths were the other way around.

With the hours of the day, the Egyptians based them on the movement of the heavens. They tracked a series of 36 small constellations, known as "decans," which would rise consecutively over the horizon approximately once every 40 minutes. The rising of each decan marked the start of a new hour. The start of a new decade (the Egyptian 10-day period) began with the appearance of a new decan in the Eastern sky just before dawn.

By the 9th Dynasty (about 2100 BC), Egyptians had augmented their solar calendar with the regular appearances of heavenly stars to create a unified annual calendar. Its 36 decades constituted the 360-day Egyptian year. Accordingly, their new system proved precise enough to accurately predict the annual flooding of the Nile with the rising of the star Sirius.

More Info: curious.astro.cornell.edu