On Tue, 3 Dec 2019 12:35:20 +0200 "Tzvetomir Stoyanov (VMware)" wrote: > +struct tracecmd_time_sync { > + unsigned int sync_proto; > + int loop_interval; > + sem_t sem; Ug, semaphores are a horrible construct. I believe you can do the same thing here with pthread_cond variables. I attached a small program that uses pthread_cond and pthread_mutex to do interval times like this. Note, another thing is, you can just have a global "end" variable that can be set and checked (as I did in my program here). -- Steve > + char *clock_str; > + struct tracecmd_msg_handle *msg_handle; > + void *context; > +}; > +