Egyptians used sundials to calculate time based on the sun. Water clocks measured time even during night, but needed some manual maintenance to keep the water flowing. Hourglasses filled with sand could also measure time, but only for a limited moment. A sundial, the device most resembling a clock today, could be ahead or behind by as much as 15 minutes, depending on the Earth's position relative to the Sun. It was also ineffective when there is no sunlight. Clocks were also important in navigation so accuracy is really important. If you can track the time it is easier to position where you are.