How do computers keep time without power?

  • #1
48
7

Main Question or Discussion Point

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?
 

Answers and Replies

  • #3
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
15,916
5,606
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?
 
  • #4
11,499
5,041
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.
 
  • #5
russ_watters
Mentor
19,425
5,593
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?
 
  • #6
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
15,916
5,606
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.
 
  • #7
jtbell
Mentor
15,519
3,358
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

  • #8
11,499
5,041
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.
 
  • #9
sophiecentaur
Science Advisor
Gold Member
24,287
4,314
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
jtbell
Mentor
15,519
3,358
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
russ_watters
Mentor
19,425
5,593
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.
 
  • #12
779
526
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.
 
  • #13
779
526
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 ;)
 
  • #14
sophiecentaur
Science Advisor
Gold Member
24,287
4,314
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.
 
  • #15
168
1
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
sophiecentaur
Science Advisor
Gold Member
24,287
4,314
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
168
1
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
sophiecentaur
Science Advisor
Gold Member
24,287
4,314
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
CWatters
Science Advisor
Homework Helper
Gold Member
10,529
2,295
+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
sophiecentaur
Science Advisor
Gold Member
24,287
4,314
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
.Scott
Homework Helper
2,464
861
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
1,516
617
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 Threads on How do computers keep time without power?

  • Last Post
Replies
5
Views
13K
  • Last Post
2
Replies
27
Views
28K
Replies
18
Views
5K
Replies
8
Views
16K
Replies
5
Views
1K
Replies
5
Views
898
Replies
1
Views
601
  • Last Post
Replies
7
Views
3K
Top