diff options
-rw-r--r-- | pw.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1571,7 +1571,9 @@ int main(int argc, char **argv) gettimeofday(&tv, NULL); now = tv.tv_sec % 1000000 * 1000 + tv.tv_usec / 1000; - if (lasttime == -1 || now - lasttime > long_interval) { + if (lasttime == -1 || + (now + 1000000000 - lasttime) % 1000000000 > long_interval) + { if ((pw.stat & stat_dirty) && pw.nlines == pw.maxlines) force = 1; lasttime = now; |