How do computers keep time without power?

In summary, a real time clock is essential for a regular desktop computer because it allows the computer to determine when files were created and when the computer is turned on.
  • #1
Tech2025
48
7
I know the CMOS battery keeps the time and BIOS settings , but what is powered by the batter to keep time? A crystal oscillator? And why is it so crucial to keep time on a regular desktop computer?
 
Computer science news on Phys.org
  • #3
Tech2025 said:
I know the CMOS battery keeps the time and BIOS settings , but what is powered by the batter to keep time? A crystal oscillator? And why is it so crucial to keep time on a regular desktop computer?
Don't you want to be able to figure out when your files were created? How about if you have the same file on two different storage media and you update one of the version and later forget which one you updated. Wouldn't you like to be able to look at a file date to see which one is more recent?
 
  • Like
Likes davenn, russ_watters, QuantumQuest and 1 other person
  • #4
Users don’t like to enter the current date and time each time the computer is turned on. Also there are some system settings that may need to be stored in a cache and so the battery keeps them safe as well.
 
  • Like
Likes russ_watters
  • #5
jedishrfu said:
Users don’t like to enter the current date and time each time the computer is turned on. Also there are some system settings that may need to be stored in a cache and so the battery keeps them safe as well.
Oh, gawd, am I having a bad DOS flashback? Was that a thing?
 
  • Like
Likes Asymptotic
  • #6
russ_watters said:
Oh, gawd, am I having a bad DOS flashback? Was that a thing?
No, DOS kept time just like modern computers do. It's always been in the hardware/BIOS, not the O.S.
 
  • Like
Likes davenn
  • #7
Surely a computer that's connected to the Internet doesn't need to save the time locally when powered off. It can grab the time from a network time server when it boots up, right? That's what MacOS does by default.

time.gif
 

Attachments

  • time.gif
    time.gif
    40.6 KB · Views: 761
  • Like
Likes berkeman
  • #8
That’s the thing though not all computers can be connected to the internet for a variety of reasons and so they need an independent means of determining the time. The manufacturer has no way of knowing how the machine will be used and whether there’s a Time server even available.
 
  • Like
Likes davenn
  • #9
jtbell said:
Surely a computer that's connected to the Internet doesn't need to save the time locally when powered off.
A laptop that's away from WiFi would really like to know what time it is. It's hardly a big power overhead. My watch battery lasts for years and it's only as big as a couple of small coins.
 
  • #10
You're right, I forgot about laptops. It's probably been several years since I used our old MacBook someplace where we didn't have a Wi-Fi connection available. It was mainly for my wife to do work on at home. We also used it when traveling, but only at a motel where could use Wi-Fi.
 
  • #11
jtbell said:
Surely a computer that's connected to the Internet doesn't need to save the time locally when powered off. It can grab the time from a network time server when it boots up, right? That's what MacOS does by default.
Certainly; but when it isn't connected to the internet it still has the same timekeeping needs.
 
  • Like
Likes davenn
  • #12
phinds said:
No, DOS kept time just like modern computers do. It's always been in the hardware/BIOS, not the O.S.
From the IBM-AT onward, but not at first. The original 5150 PC didn't have a real time clock (neither did the PC-XT and 3270 PC, IIRC), and it was necessary to add DATE and TIME commands in the AUTOEXEC.BAT to remind the user to set the date and time.

3rd party manufacturers of that era sold expansion cards containing an RTC (either stand-alone, but more likely embedded within a serial-parallel IO card) along with a utility program to initially set the RTC, and transfer time/date data from the RTC to operating system when called from AUTOEXEC during boot. Adding to the pain, since RTCs weren't part of the original PC spec there was no standardization on how to do it, and a time setting program by vendor A didn't work on the cards sold by vendor B.
 
  • Like
Likes FactChecker
  • #13
russ_watters said:
Oh, gawd, am I having a bad DOS flashback? Was that a thing?
Yes, but not so bad a thing as as forgetting to PARK the hard drive before powering down ;)
 
  • Like
Likes Grinkle and FactChecker
  • #14
russ_watters said:
Certainly; but when it isn't connected to the internet it still has the same timekeeping needs.
That reminds me of my 'intellectually challenged' telescope mount which has no clock in it. The time is of great importance when looking for a celestial object but whenever I set up the mount, it asks me the time. It remembers the last date I used it but that's almost worse than nothing.
Why did they not instal a cheap clock with a lithium battery - they've been available for yonks? At least, when I eventually get round to it, I can use my laptop for control the thing and that knows the time.
 
  • Like
Likes Asymptotic
  • #15
sophiecentaur said:
A laptop that's away from WiFi would really like to know what time it is. It's hardly a big power overhead. My watch battery lasts for years and it's only as big as a couple of small coins.
Except when you have a watch made in china:oldlaugh:
 
  • #16
Suyash Singh said:
Except when you have a watch made in china:oldlaugh:
You must have had a bad experience?
Are batteries for your watch difficult to get hold of?
 
  • #17
sophiecentaur said:
You must have had a bad experience?
Are batteries for your watch difficult to get hold of?
China is famous for defected pieces and duplicates!
All their items break within 6 months and quality is so poor that i could make better if i had the time.
And their items use up the battery in like a week!:confused:
Russian , Korean , Japanese, etc items are great though. And indian textiles too if you get real material.

Or maybe the Chinese just sell all their waste in India.:olduhh:
 
  • #18
Suyash Singh said:
Or maybe the Chinese just sell all their waste in India
That just could be true --- commiserations.
To be fair to China, I (in UK) have had some fair ebay purchases from China. Incredible low prices for small items that I couldn't source anywhere else. And the postage has been free too?
 
  • #19
+1

Official spare parts for my American made ride on mower are a ridiculous price in the UK. A gasket set for the carb costs more than a whole new carb and gasket set shipped from China.
 
  • #20
CWatters said:
a whole new carb
That is not a high risk part but I would think twice if it was a brake calliper or suspension arm. Counterfeit stuff is a real worry and the source can so far away that there's no possible sanction. They can re-name the original supplier and be back in business in no time.
But, on a political note, with half the World living above its means and the other half way below, there will always be problems like this. Meanwhile the international Oligarchs make astronomical sums of money; they are living of the differential.
 
  • #21
Just a note: That battery may also power volatile memory used for storing the BIOS settings.
And the batteries are only good for about 3 years of duty time.
 
  • #22
jedishrfu said:
Users don’t like to enter the current date and time each time the computer is turned on. Also there are some system settings that may need to be stored in a cache and so the battery keeps them safe as well.
I think most of us simply never bothered entering the date and time. I had a pretty set routine of power tower, power monitor, then press enter twice to get to the prompt. I'm not sure I ever literally gave my 8088 the correct date/time.
 

Related to How do computers keep time without power?

1. How do computers keep time without power?

Computers use a small battery-powered component called the CMOS (Complementary Metal-Oxide Semiconductor) clock to keep track of time even when the power is turned off. This clock is powered by a small battery that can last for several years.

2. How does the CMOS clock work?

The CMOS clock uses a quartz crystal oscillator to keep time. This crystal vibrates at a steady frequency when an electric current is passed through it. The computer counts these vibrations and converts them into seconds, minutes, hours, and so on.

3. What happens if the CMOS battery dies?

If the CMOS battery dies, the computer will lose track of time and will reset its clock to a default date and time. This can cause issues with certain programs that rely on accurate time, such as security software or online banking applications.

4. How often do CMOS batteries need to be replaced?

CMOS batteries typically last between 3 to 5 years, but this can vary depending on the type and quality of the battery, as well as the usage of the computer. It is recommended to replace the battery every 3 years to ensure accurate timekeeping.

5. Can the CMOS clock be manually adjusted?

Yes, the CMOS clock can be manually adjusted by accessing the computer's BIOS (Basic Input/Output System) settings. However, it is important to note that manually changing the clock can cause issues with certain programs that rely on accurate time, so it is best to let the clock sync automatically with internet time servers.

Similar threads

Replies
8
Views
1K
  • Computing and Technology
Replies
10
Views
2K
  • Computing and Technology
Replies
8
Views
525
Replies
11
Views
1K
Replies
26
Views
2K
  • Computing and Technology
Replies
8
Views
2K
  • Computing and Technology
Replies
12
Views
1K
  • Computing and Technology
Replies
13
Views
2K
Replies
9
Views
2K
  • Computing and Technology
Replies
6
Views
1K
Back
Top