How did ancient Chinese people keep track of time?

They used sun dials