Latency functions in Linux

Source: Internet
Author: User
Application Layer:
# Include <unistd. h>
 
1. Unsigned int sleep (unsigned int seconds); seconds
2. Int usleep (useconds_t USEC); microseconds: 1/10 ^-6
 
# DEFINE _ posix_c_source 199309
# Include <time. h>
3. Int nanosleep (const struct timespec * req, struct timespec * rem );
Struct timespec {
Time_t TV _sec;/* seconds */
Long TV _nsec;/* nanoseconds */
};
// The value of the nanoseconds field must be in the range 0 to 999999999.
 
Kernel layer:
Include <Linux/delay. h>
1. Void ndelay (unsigned long nsecs); nanosecond level: 1/10 ^-10
2. Void udelay (unsigned long usecs); microseconds: 1/10 ^-6
3. Void mdelay (unsigned long msecs); millisecond level: 1/10 ^-3
 

--
Personal Homepage: www.frequenter.com.cn. Welcome to visit! Thank you!

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.