K
K
kodwi2015-03-21 12:29:54
linux
kodwi, 2015-03-21 12:29:54

Explain on your fingers - how to work with setitimer?

It is necessary to display the time every 0.5 seconds.
Can you humanly explain how to work with this call, what exactly the 2nd and 3rd arguments of the function mean and how to fill them in to solve my problem?

int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eddy_Em, 2015-03-21
@Eddy_Em

read man
In my opinion, a simpler option would be to use select. And set the waiting time in accordance with the value of the current time (so as not to accumulate an error).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question