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:
Steven Rostedt 2011-09-01 21:29:31 -04:00 committed by Steven Rostedt
parent ae357be2e8
commit da4956cbca
1 changed files with 4 additions and 1 deletions

View File

@ -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 */