aboutsummaryrefslogtreecommitdiff
path: root/src/xz/coder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2013-07-04 12:51:57 +0300
committerLasse Collin <lasse.collin@tukaani.org>2013-07-04 12:51:57 +0300
commit736903c64bef394c06685d79908e397bcb08b88f (patch)
tree43fe081b093ef6ec278ae67099af4a25356a3008 /src/xz/coder.c
parentUpdate THANKS. (diff)
downloadxz-736903c64bef394c06685d79908e397bcb08b88f.tar.xz
xz: Move some of the timing code into mytime.[hc].
This switches units from microseconds to milliseconds. New clock_gettime(CLOCK_MONOTONIC) will be used if available. There is still a fallback to gettimeofday().
Diffstat (limited to 'src/xz/coder.c')
-rw-r--r--src/xz/coder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xz/coder.c b/src/xz/coder.c
index 54864506..897ff6a9 100644
--- a/src/xz/coder.c
+++ b/src/xz/coder.c
@@ -766,6 +766,11 @@ coder_run(const char *filename)
// Don't open the destination file when --test
// is used.
if (opt_mode == MODE_TEST || !io_open_dest(pair)) {
+ // Remember the current time. It is needed
+ // for progress indicator and for timed
+ // flushing.
+ mytime_set_start_time();
+
// Initialize the progress indicator.
const uint64_t in_size
= pair->src_st.st_size <= 0