I'm trying to use the timer functions in linux. setitimer() getitimer.
What I'm trying to do is get the program to execute a loop for a certain amount of time, but for the life of me I can't figure out how to use the above two functions to do that.
Is there anyother way ?
pseudo code is something like this.
while(timer not expired)
do some code here...