Horologion is known as just a clock room today. But,it was used as an observatory and a clock room to determine the time and dates back to much earlier times. It also functioned both as an entrance to the church and a place with sound based measure of the time. A captive in Byzantine in the 10th century, Harun Ibn Yahya gives a description of the building.
‘’ … a building in which twenty-four small doors open, each (measuring) one span square; there is one for each of the hours of the day and night. When an hour ends, a door opens by itself…’’
The Horologion was also used as a ceremonial entrance used as a change room by the emperor before he entered the church. The emperor would also use it as a shortcut entrance from Chalke Gate (the entrance hall of the Great Palace) to Hagia Sophia. He is said to have observed the Construction process through Horologion of Hagia Sophia. There would lie Augustaion between the Chalke and the Horologion.
By the way, there was also a shorter and more confidential way of reaching Hagia Sophia: the Holy Well Gate. Justinian would use the Holy Well Gate on special days like Easter Saturdays, other days he would use the Horologion Gate.