Linux中的延时函数
2013-12-19 20:30
197 查看
应用层:
#include
<unistd.h>
1、unsigned int sleep(unsigned
int seconds); 秒级
2、int usleep(useconds_t
usec);
微秒级: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;
long
tv_nsec;
};
// The value of the nanoseconds field must be in the range 0 to
999999999.
内核层:
include
<linux/delay.h>
1、void ndelay(unsigned long
nsecs);
纳秒级:1/10^-10
2、void udelay(unsigned long
usecs);
微秒级: 1/10^-6
3、void mdelay(unsigned long
msecs);
毫秒级:1/10^-3
#include
<unistd.h>
1、unsigned int sleep(unsigned
int seconds); 秒级
2、int usleep(useconds_t
usec);
微秒级:1/10^-6
[align=center][/align] |
199309
#include
<time.h>
3、int nanosleep(const struct
timespec *req, struct timespec *rem);
struct timespec {
time_t
tv_sec;
long
tv_nsec;
};
// The value of the nanoseconds field must be in the range 0 to
999999999.
内核层:
include
<linux/delay.h>
1、void ndelay(unsigned long
nsecs);
纳秒级:1/10^-10
2、void udelay(unsigned long
usecs);
微秒级: 1/10^-6
3、void mdelay(unsigned long
msecs);
毫秒级:1/10^-3
相关文章推荐
- Linux脚本中的延时处理函数
- linux和windows下,C/C++开发的延时函数,sleep函数
- linux 延时函数
- Linux延时函数
- linux 用户空间和内核空间延时函数
- linux中内核延时函数
- Linux 内核使用毫秒延时函数
- linux延时函数
- Linux中的延时函数
- linux用户空间的延时函数分析 (2011-08-16 10:28)
- linux延时一秒函数
- linux 用户空间 和 内核空间 延时函数
- linux 用户空间 和 内核空间 延时函数
- Linux内核延时函数
- linux中内核延时函数 (转)
- (笔记)Linux延时及时间函数总结
- linux 用户空间 和 内核空间 延时函数
- linux 延时及时间函数总结
- linux 用户空间 和 内核空间 延时函数
- linux 用户空间 和 内核空间 延时函数