Setitimer () is a Linux API, not the standard library of C language.
Setitimer () has two functions: one is to execute a function after a period of time, and the other is to execute a function for a period of time.
The following program demo shows
There are two types of timers under Linux, each of which is described below:1, AlarmUsing alarm () and signal () is sufficient if it is not required to be precise.unsigned int alarm (unsigned int seconds)Function Description: Alarm () is used to set
There are two types of timers in Linux:
1. AlarmAlarm () and signal () are enough if they are not required to be accurate.Unsigned int alarm (unsigned int seconds)
Function Description: Alarm () is used to set the signal sigalrm to be transmitted to
Reprinted from: http://www.cublog.cn/u2/76349/showart_2227666.html
Linux setitimer for computer players commonly used software, then I will learn and study LinuxSetitimer, here to discuss with you how to use Linux setitimer, hope to be useful to
Linux setitimer is a commonly used software for computer players. Then I will study and study Linux setitimer in depth. Here I will discuss with you how to use Linux setimer, hoping to help you. Linux setitimer () is a Linux API, not the Standard
How to Use setitimer in linux c Programming, linuxsetitimer
In linux c programming. Setitimer is a function that is frequently used than timer. Latency and timing
Header files to be introduced during use:
#include
Setitimer function
In Linux C programming, Setitimer is a relatively common function, can be used to implement the function of time delay and timing, the online have a variety of fragmented usage instructions, have only mentioned the individual usage, today time to
Function: In Linux system programming, Setitimer is a function that is used frequently to realize the function of delay and timing.Header file: sys/time.hFunction Prototypes:int setitimer (int which, conststruct itimerval *New_value,
Turn from: http://blog.csdn.net/lixianlin/article/details/25604779
In Linux C programming, Setitimer is a relatively common function, can be used to realize the delay and timing of the function, the Internet has a variety of sporadic usage
I. Three time Structures
Time_t: // seconds
Struct timeval {
Long TV _sec;/* seconds */
Long TV _usec;/* microseconds */
};
Struct timespec {
Time_t TV _sec;/* seconds */
Long TV _nsec;/* nanoseconds */
};Ii. setitimer ()
In the
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.