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 ??

usleep

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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -