33

My iPhone is always running out of battery. However, when I power it back up, the time is still in perfect synchronization. This begs the question: "How does it keep time when it is out of battery?"

There must be some sort of 'ticking' mechanism in the phone while it is out of battery and, thus, not entirely out of battery.

6 Answers 6

37

The iPhone is not completely depleted when the battery "dies." If you'll notice, when you try to turn it on when the battery is dead, the screen will come on briefly to tell you the battery is dead -- i.e., there is still some energy left in the battery. The clock continues to run off of the battery, and takes such a small amount of energy that Apple decided to keep the clock going.

Eventually, the battery will completely die (probably after many days or weeks), and the clock will eventually stop keeping time. As Ian C. mentioned, the clock will synchronize when the phone does get plugged in and turned on again, if a network is available.

19

The phone synchronizes its clock with your wireless provider's embedded clock signal when it starts up. All cellular protocols provide for a clock network feature that lets devices on the network synchronize their time and date with a master time and date from the provider.

So it isn't that the phone kept time while it was out of power, it was that it set the correct date and time when started up.

2
  • 2
    And I would amplify - the device shuts down the OS and hardware other than the clock at voltage levels far above the point where the last chip running is drawing a minuscule amount of power. Yes, if the lights are "turned out when the last chip surrenders to low voltage" - the device will re-sync via wireless as long as you allow setting of time. I've seen devices in AirPlane mode be without power for 6 months and still not have the clock fail to keep time - so in practice, the device doesn't even need to set time the vast majority of cases. +1 for the short and useful answer.
    – bmike
    Apr 2, 2013 at 18:55
  • It could also be using the good old NTP (Network Time Protocol). There would be less regional/international issues with using this approach.
    – Daniel
    Apr 2, 2013 at 22:00
14

The Real Time Clock is a component independent of the primary CPU (although it's all part of the same SOC IC) which will continue running from a lower voltage than is required to run any other part of the phone. As a phone's battery is depleted its voltage decreases, and below a certain voltage some components will fail to function at all. It may be depleted so far that it would be considered permanently damaged and un-rechargeable and it would still have enough voltage to run the RTC.

2

It's better to ask how computers take time? Usually they have another power source to run the timer circuit. I think in the apple devices it is not the main battery. As I remember in my desktop PC besides AC power, a simple battery holds the time for 5 or 6 years. (I remember we should take out that battery to reset BIOS password!). So I think there most be some other energy sources like a small battery to keep your time and passwords.

3
  • 4
    The iPhone uses its main battery for everything, and so do the last few generations of Apple computers.
    – Ryccardo
    Apr 2, 2013 at 22:21
  • @Ryccardo I believe you about the iPhone, but did you mean to say Apple desktops do not have a separate battery apart from AC power? Apr 3, 2013 at 15:02
  • 2
    Indeed. I was actually doubtful of posting such a claim, but both circuit board scans and the omnipresent "Replacement batteries for […]" websites show the lack of an actual battery. I speculate the use of a supercap (large capacitor), as used on most digital cameras -- or to make a more provocatory assumption: if Apple predicts an heavy duty Internet connection is available everywhere (think of iCloud and Internet Recovery), an occasional NTP sync would be the last problem.
    – Ryccardo
    Apr 3, 2013 at 15:20
0

A laptop does it with a CMOS Battery. So, Apple probably put something small like that inside the iPhone. Actually, Persistent Storage is another point to consider. For Example, I had an HP Pocket PC Phone that would Delete all the Data when the Battery Died. (You can see now why we all use Apple Products.) And finally, remember that Cell Phones (and Computers) can get Time Over-the-Air (Network) and Internet.

0

Although it is an old thread and a lot of good answers have already been given, I would like to add a point no one mentioned so far. If you switch your phone to airplane mode and the battery is running out of power below the minimal level required for the RTC (Real Time Clock) to run, or even better if you disconnect the battery, once you turn back the phone on, date and time will not be able to synchronize (because it would still be on airplane mode obviously) and you will notice date and time will be set to a moment in time just before the phone ran out of power (maybe 1 or 2 minutes before). That is the reason why I would be inclined to think current date and time are written periodically in flash memory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .