First, describe the concept of a few times:
World Time: At first, the International Standard Time was Greenwich Mean time, with the sun crossing the Prime meridian at a time of 12 noon. It is defined according to the astronomical environment, just as the ancient people timed it according to the Sundial, such as:
Atom : Earth's rotational speed is not constant in a year, it sometimes turns fast, sometimes slow, earthquakes may make the Earth's rotation faster, and the launch of the satellite makes the rotation slow, but the overall rotation trend of the earth is more and more slow. If the length of time is defined according to the rotation of the earth in a lap of 24 hours, the length of one second will be unstable, or long or short. To solve this problem, the researchers found that the atomic motion frequency of an element is stable, and that the atomic motion of the element can be measured as a second unit of time, which is the atom. Such as
co-ordination : When atoms are in conflict with the time of the world, one is fixed, one is long or short, because the overall rotation of the earth is becoming slower, and as time increases, the gap between them becomes larger, the atom will be faster than the world, and 5,000 years later the atom will be 1 hours faster than the world. In this way, there is a conflict, whichever is it? In order to compromise, when there is coordination, when the atom is faster than the world time, let the atoms pause, wait for the world, let the world catch up. The adjustment of these times is called "Leap seconds". Co-ordination is the time shown on our current phone and computer.
The Unix/linux system provides services about time and has the following function APIs:
time_t
clock_t
Unix/linux System Time Function API