Computers have a clock inside them. 
Computers use a special clock. 
Some systems count seconds. They count from a day in 1970. Other systems count even smaller ticks. These ticks are very fast.
Computers can change these ticks into dates. This helps us read the time. We can see the year and month.
Old computers did not have this. Now many things use it. Your phone and even your microwave use it.
It helps machines work together. It keeps everything on track.
Computers have a way to track time. This is called system time. It is not like a clock on your wall. Instead, it is a count of tiny ticks. These ticks start from a special date. We call this starting date an epoch.

Many systems use Unix time. This counts the seconds since January 1, 1970. Other systems use different starts. Windows counts tiny ticks since the year 1601. Computers can turn these counts into a calendar. This makes the time easy for humans to read. It shows the year, month, and day.
Some systems might run into a problem soon. This is called the Year 2038 problem. It happens because some systems use a 32-bit value. This is a way to store numbers. These numbers will run out of space in 2038. This could cause errors in software. People must fix this, just like the Year 2000 problem.
Most modern devices use this. Your cell phone and even your microwave use it. Even small tools like an Arduino use it. Some must get the time from a server. Others need a person to type it in.
Computers need a way to know what time it is. This is called system time. It is the computer's own idea of a specific moment. Most systems do not use a clock like the one on your wall. Instead, they use a system clock to count tiny units. These units are often called ticks. The clock counts how many ticks have happened since a starting point. This special starting date is called an epoch. 
How does this counting work? A system clock is often a programmable interval timer. This timer sends a signal to the CPU at regular times. This signal is called an interrupt. When the CPU receives this, it stops its current task for a moment. It then runs a small routine to add one tick to the counter. After the tick is added, the CPU goes back to its original work. This way, the computer keeps track of time even while it is busy. 
In the past, computers were different. Many first-generation personal computers did not track dates or times at all. This included early models like the Apple II and the Commodore PET. Some systems, like CP/M, also did not have this feature. Later, people could add special boards to IBM PCs to track time. The IBM AT was the first widely available PC with time hardware built right into its motherboard. 
Different systems use different rules for their counts. Unix and POSIX systems use Unix time. This counts the seconds since January 1, 1970. Windows uses a different method. It counts 100-nanosecond ticks since January 1, 1601. Some systems might face a big hard job soon. This is called the Year 2038 problem. It happens because 32-bit systems will run out of bits to store the count. This could cause many software and hardware errors. 
You see system time in many places every day. Most modern devices like cell phones and cameras use it. Even household items like microwave ovens and air conditioners keep track of time. Some small tools, like an Arduino, might not have their own time hardware. These small tools often get the time from a server or a person. This helps them know the correct time to start their tasks. 
In computing, system time is a computer system's internal notion of a specific point in time. It is not a visual clock like the one on your wall. Instead, it is a way for software to understand when events occur. This measurement is vital for organizing data, scheduling tasks, and synchronizing different machines across a network. Without a reliable way to track time, computers could not manage files or communicate effectively. 
To track time, computers use a system clock. This is often a programmable interval timer. The timer works by sending a periodic signal to the CPU. This signal is called an interrupt. When the CPU receives an interrupt, it pauses its current task. It then executes a timer interrupt service routine. This routine adds one tick to the system clock, which is a simple counter. After this housekeeping is done, the CPU returns to its previous work. This constant cycle allows the system to maintain a running count of time.
Because computers count differently, they use different starting points known as epochs. An epoch is an arbitrary date chosen as the beginning of the count. For example, Unix and POSIX-compliant systems use Unix time. This measures the number of seconds elapsed since the Unix epoch on 1 January 1970. Other systems, like Windows, use different rules. Windows provides time as a year, month, day, hour, minute, second, and millisecond value. It also counts 100-nanosecond ticks since 1 January 1601. These counts are often converted into calendar time so humans can read them easily.
Different operating systems and languages provide various levels of resolution. Resolution refers to the smallest unit of time a system can measure. For instance, Android has a resolution of 1 millisecond. Some systems, like OpenVMS, can measure time in 100-nanosecond increments. Even more precise systems can measure in nanoseconds. However, a high resolution does not always mean high precision. A system might report time in microseconds but only be able to discern ticks every 10 milliseconds. This difference between the reported unit and the actual frequency is an important distinction.
System time has changed significantly throughout history. Many first-generation personal computers did not track dates or times at all. This included early models like the Apple II, the BBC Micro, and the Commodore PET. The CP/M operating system also lacked this capability. Later, users could add peripheral boards with real-time clock chips to IBM PCs. The IBM AT was the first widely available PC to have this hardware built into the motherboard. Before computer networks were common, most systems only tracked local time without accounting for time zones.
Modern technology has made time tracking nearly universal. Most household devices use local civil time. This includes cell phones, cameras, microwave ovens, and even central air conditioners. However, some small controllers, known as microcontrollers, are different. Devices like the Arduino or Raspberry Pi do not always have internal hardware to track time. These embedded systems may operate without knowing the external time. To fix this, they often get the time from an external source, like a time server, or by asking a user to enter it manually.
One major concern for computer scientists is the Year 2038 problem. This issue affects many implementations that store system times as 32-bit integer values. As the count of seconds increases, these 32-bit values will eventually overflow. This means the system will run out of bits to represent the number. Such an overflow could lead to serious software and hardware errors. This problem is similar to the earlier Year 2000 problem. It may also affect existing data file formats that use 32-bit timestamps. Systems will need remediation to handle time beyond this limit.
System time is also closely related to other types of measurements. Process time is a count of the total CPU time used by a running process. This can be split into user CPU time and system kernel code time. Unlike system time, process time tracks CPU instructions or clock cycles. It does not usually have a direct correlation to actual wall time. Additionally, file systems use timestamps to track when files are created, modified, or accessed. These timestamps are stored in a file control block, also known as an inode. This ensures that every digital action is recorded in the timeline of the system.
🖼️ Images & Media (1)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.