diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-09-01 21:29:31 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-09-01 21:29:31 -0400 |
commit | da4956cbcaf7945554f30e4d3a9be09b1431b19a (patch) | |
tree | aa280eee4f8335f926e390701b16c2cb26064b79 | |
parent | ae357be2e8d48cc1fd14816a205d5f5f74007b40 (diff) | |
download | cyclictest-da4956cbcaf7945554f30e4d3a9be09b1431b19a.tar.gz |
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>
-rw-r--r-- | src/cyclictest/cyclictest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index ff36ce2..db5c228 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -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 */ |