call Function in specific time interval using pthread in linux c++ -
i want call function in specific time (2 micro second) interval using pthread in linux c++.
i want call function inside pthread till specific condition occur after rest of code inside thread run. procedure occur continue.
please give solution or example code ??
use loop , call function, after/before it, put usleep.
the usleep() function suspends execution of calling thread (at least) usec microseconds. sleep may lengthened system activity or time spent processing call or granularity of system timers.
Comments
Post a Comment