By analyzing how the values on the Sun Dial would change throughout the year due to the precession of the Earth's axis, you can infer the length of night. However, once we realized that quartz is really good at defining a second, we were able to use oscillation as a means of telling time without sunlight.
Quartz? Quartz clocks are about 100 years old. You make it sound ljke we went from sundials to Casios lol. Mechanical clocks are around 1800 years old. Pendulum clocks around 500 years old and spring mechanical slightly younger.
If spring and pendulum clocks were only invented after 1300 years of clocks existing, how did clocks work before? Powered by a weight pulling down that has to be lifted back up every so often?