summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-02-04 12:01:23 +0800
committerJia Tan <jiat0218@gmail.com>2023-02-04 20:11:51 +0800
commitb8bce89be7fb5bffe5fef4a2782ca9b2b107eaac (patch)
treef2295291c13eee554b2cb8bc4fc89bdc68bbd7f7 /src
parent912af91b10a18fb9bb3167247ecaaefca8248ee9 (diff)
downloadxz-b8bce89be7fb5bffe5fef4a2782ca9b2b107eaac.tar.gz
xz: Add a comment clarifying the use of start_time in mytime.c.
Diffstat (limited to 'src')
-rw-r--r--src/xz/mytime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xz/mytime.c b/src/xz/mytime.c
index 8d5e994..917eff0 100644
--- a/src/xz/mytime.c
+++ b/src/xz/mytime.c
@@ -20,6 +20,11 @@
uint64_t opt_flush_timeout = 0;
+// The start_time variable will not represent the actual start time
+// if mytime_sigtstp_handler() executes. The signal handler measures
+// the amount of time spent stopped and adds it to start_time.
+// So, care must be taken in the future if the actual start time needs
+// to be displayed for any reason.
#ifdef USE_SIGTSTP_HANDLER
static volatile uint64_t start_time;
#else