Why Does My Computer Clock Gain Time?
It can be confusing to look at your computer's clock one moment and see the time--then look later to discover that the computer's time has jumped ahead several minutes. This "jump" is actually an attempt by Microsoft Windows to keep the clock on your computer accurate.
The BIOS, or Basic Input-Output System, is a set of low-level software that controls computer hardware while acting as an interface between the hardware and software in a computer system. A chip called the RTC (Real-Time Clock) is contained within the BIOS system and is what keeps the time on your computer system. This information is stored on a CMOS chip (Complementary Metal Oxide Semiconductor) that requires a small amount of electrical power to maintain its settings.
The electrical power needed to retain those settings is as small as 1 microamp (millionth of an amp) and is provided by a lithium coin cell battery housed on your computer's system board. These batteries normally last for several years but weaken near the end of their life. The most visible symptom of a weakening CMOS battery is lost time on the computer clock, but eventually you will lose other settings when the computer is shut off.
Windows Time Service
Microsoft Windows is aware that a weakening CMOS battery may cause a computer clock to lose time. Versions of Microsoft Windows from XP onward come equipped with Windows Time Service. Windows Time Service is a background process that synchronizes the computer's RTC with a network time server. By default, on personal computers that server is time.windows.com. To synchronize, Windows must first have an active Internet connection in order to communicate with the network server, so this service becomes active when a live connection is made to the Internet.
Windows Time Service queries the network time server and if the computer's time is inaccurate by a certain threshold (one second to five minutes, depending upon the network configuration of the system) the time is updated immediately. However, if the time differs from the Internet time source by 15 hours or more the time will not be synchronized. This time synchronization can cause noticeable gains on your computer clock if the CMOS battery is very weak. Some versions of Windows, for instance Windows 7, can be configured to notify you if the time has to be adjusted, but other versions of Windows will simply correct the time without notifying you.
If your computer is gaining a significant amount of time whenever it synchronizes with the network time servers, this is an indication that the CMOS battery is in the process of failing. Have the battery replaced by a computer technician and the time jumps will cease.