diff --git a/src/rrdtool.c b/src/rrdtool.c
index 3265561673fb2263c76965c2bea5f4f7ab0d78d2..95bde6941e459b03b68ab29da00d31c6b03ab34b 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
break;
gettimeofday (&tv_now, /* timezone = */ NULL);
- status = timeval_sub_timespec (&tv_next_update, &tv_now,
- &ts_wait);
+ status = timeval_cmp (tv_next_update, tv_now, NULL);
/* We're good to go */
- if (status != 0)
+ if (status <= 0)
break;
/* We're supposed to wait a bit with this update, so we'll