STEAM 组
sys_nanosleep 0xa2
STEAM 组
sys_nanosleep 0xa2
0
游戏中
1
在线
成立于
2018 年 3 月 25 日
语言
日语
国家/地区
Israel 
关于 sys_nanosleep

for those who don't need tasks to be done !

nanosleep() suspends the execution of the calling thread until either
at least the time specified in *req has elapsed, or the delivery of a
signal that triggers the invocation of a handler in the calling
thread or that terminates the process.

If the call is interrupted by a signal handler, nanosleep() returns
-1, sets errno to EINTR, and writes the remaining time into the
structure pointed to by rem unless rem is NULL. The value of *rem
can then be used to call nanosleep() again and complete the specified
pause (but see NOTES).

The structure timespec is used to specify intervals of time with
nanosecond precision. It is defined as follows:

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.

Compared to sleep(3) and usleep(3), nanosleep() has the following
advantages: it provides a higher resolution for specifying the sleep
interval; POSIX.1 explicitly specifies that it does not interact with
signals; and it makes the task of resuming a sleep that has been
interrupted by a signal handler easier.
热门讨论
1 条留言
librin.so.1 2018 年 4 月 7 日 下午 1:01 
nanosleep() is the best thing since sliced bread.
组成员
管理员
成员
0
游戏中
1
在线
0 聊天中
进入聊天室
成立于
2018 年 3 月 25 日
语言
日语
国家/地区
Israel