Old China divided the night from sunset to sunrise into five 更 (gēng) watches, each roughly two hours: 一更 19-21, 二更 21-23, 三更 23-01, 四更 01-03, 五更 03-05. Watchmen struck a wooden 梆 (bāng) clapper to mark each one.
history
The phrase 三更半夜 (sāngēng bànyè, 'middle of the night') and 五更鸡叫 (rooster crowing at the fifth watch) come from this system and survive in modern Chinese long after the watches themselves disappeared.