Shun time(), since on Linux it is not monotonic with gettimeofday().
[disorder] / lib / eclient.c
index 40639f3..101a7bf 100644 (file)
@@ -417,7 +417,7 @@ void disorder_eclient_polled(disorder_eclient *c, unsigned mode) {
   /* Queue up a byte to send */
   if(c->state == state_log
      && c->output.nvec == 0
-     && time(&now) - c->last_prod > LOG_PROD_INTERVAL) {
+     && xtime(&now) - c->last_prod > LOG_PROD_INTERVAL) {
     put(c, "x", 1);
     c->last_prod = now;
   }