system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does a computer know how long a "second" is?

Or any unit of time for that matter. Humans defined the idea of a second; it's not a natural property of the universe. Especially interested in how it was managed on earlier computers (assuming it was different).
gpt
The motherboard has a quartz crystal on it which vibrates at a known frequency. The motherboard uses this to keep track of time.

The button cell battery on a motherboard is to pass on electric current through the crystal, which is what causes it to vibrate.