Unix/linux System Time Function API

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.