It’s actually easier to tell the time using the stars rather than the sun, because the elevation of the sun is hard to estimate without using a device like a sundial; but there are always stars near enough to the horizon that their elevation can be estimated with the unaided eye.