aboutsummaryrefslogtreecommitdiff
path: root/src/xz/mytime.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2020-01-26 20:53:25 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-01-26 20:53:25 +0200
commitba76d67585f88677af9f48b48e7bdc3bb7687def (patch)
tree76acbc9d826bf86a26f1546c4c517078e69244b0 /src/xz/mytime.c
parentxz: Move flush_needed from mytime.h to file_pair struct in file_io.h. (diff)
downloadxz-ba76d67585f88677af9f48b48e7bdc3bb7687def.tar.xz
xz: Set the --flush-timeout deadline when the first input byte arrives.
xz --flush-timeout=2000, old version: 1. xz is started. The next flush will happen after two seconds. 2. No input for one second. 3. A burst of a few kilobytes of input. 4. No input for one second. 5. Two seconds have passed and flushing starts. The first second counted towards the flush-timeout even though there was no pending data. This can cause flushing to occur more often than needed. xz --flush-timeout=2000, after this commit: 1. xz is started. 2. No input for one second. 3. A burst of a few kilobytes of input. The next flush will happen after two seconds counted from the time when the first bytes of the burst were read. 4. No input for one second. 5. No input for another second. 6. Two seconds have passed and flushing starts.
Diffstat (limited to 'src/xz/mytime.c')
-rw-r--r--src/xz/mytime.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/xz/mytime.c b/src/xz/mytime.c
index 573b97de..70444001 100644
--- a/src/xz/mytime.c
+++ b/src/xz/mytime.c
@@ -51,7 +51,6 @@ extern void
mytime_set_start_time(void)
{
start_time = mytime_now();
- next_flush = start_time + opt_flush_timeout;
return;
}