So I got scooped on the whole candle thing, which I really wanted to go with. Instead, I’m going to pivot and say that accurate timekeeping - day or night - was actually driven by the needs of navigation. 
You could get a pretty good idea of when it was based on the position of the sun and stars, as long as you knew where you were. The opposite is also true - you could figure out where you were, as long as you knew what time it was (and had the appropriate charts/data). The problem was that, while sailing around the world, ships often didn’t know either one.
For rough purposes, people used things like candles. In some cases, monks would recite specific prayers at a given cadence to keep track of time overnight and so know when to wake the others. These methods, as well as later inventions like the pendulum clock that used a known time component to drive watch mechanisms, were all but useless for navigation due to inaccuracies. They were good enough in the 1200s to let the monks know when to pray, though.
The first pendulum clocks "broke" when shipped to other parts of the world. They didn't keep the same time as the place of manufacture because gravity was ever so slightly different (Earth being an oblate spheroid) approaching the equator slowed the clocks down enough to slowly lose time.
There were so many problems with monitoring time. Even today I always dread it a bit. While we’ve tried to at least move the issues from the mechanistic to the philosophical, we still run into things like the Y2K and the 2038 problems. Hell, I remember running into an issue with calculating leap years and such as an undergrad.
I like to think that, if nothing else, it gives me a greater appreciation for Discworld.
Fun fact: we're pretty sure this is why hourglasses (or sand clocks in general) were invented! They flow at a pretty consistent rate even on board a ship, and were basically just a tweak on the design of a water clock.