use interval on first loop instead of 1 second
Use the interval given for the first loop instead of one second wait. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
ae357be2e8
commit
da4956cbca
|
@ -621,8 +621,11 @@ void *timerthread(void *param)
|
|||
|
||||
/* Get current time */
|
||||
clock_gettime(par->clock, &now);
|
||||
|
||||
next = now;
|
||||
next.tv_sec++;
|
||||
next.tv_sec += interval.tv_sec;
|
||||
next.tv_nsec += interval.tv_nsec;
|
||||
tsnorm(&next);
|
||||
|
||||
if (duration) {
|
||||
memset(&stop, 0, sizeof(stop)); /* grrr */
|
||||
|
|
Loading…
Reference in New Issue