]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xz: Add a comment clarifying the use of start_time in mytime.c.
authorJia Tan <jiat0218@gmail.com>
Sat, 4 Feb 2023 04:01:23 +0000 (12:01 +0800)
committerJia Tan <jiat0218@gmail.com>
Sat, 4 Feb 2023 12:11:51 +0000 (20:11 +0800)
src/xz/mytime.c

index 8d5e994ff84b40d03f8106ed255ee3ca09d12898..917eff0f57a006b6c6cab0a8ffc989d8bbd2949d 100644 (file)
 
 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