summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.c')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index f16833609..c3575654b 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -79,16 +79,15 @@ int
iot_notify_wait (iot_worker_t *worker, int idletime)
{
struct timeval tv;
- struct timespec ts;
+ struct timespec ts = {0, };
int waitres = 0;
gettimeofday (&tv, NULL);
- ts.tv_sec = tv.tv_sec + idletime;
/* Slightly skew the idle time for threads so that, we dont
* have all of them rushing to exit at the same time, if
* they've been idle.
*/
- ts.tv_nsec = skew_usec_idle_time (tv.tv_usec) * 1000;
+ ts.tv_sec = skew_sec_idle_time (tv.tv_sec + idletime);
#ifndef HAVE_SPINLOCK
waitres = pthread_cond_timedwait (&worker->notifier, &worker->qlock,