1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
6 /// \brief Time handling functions
8 // Author: Lasse Collin
10 ///////////////////////////////////////////////////////////////////////////////
13 /// \brief Number of milliseconds to between LZMA_SYNC_FLUSHes
15 /// If 0, timed flushing is disabled. Otherwise if no more input is available
16 /// and not at the end of the file and at least opt_flush_timeout milliseconds
17 /// has elapsed since the start of compression or the previous flushing
18 /// (LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH), set LZMA_SYNC_FLUSH to flush
20 extern uint64_t opt_flush_timeout
;
23 #ifdef USE_SIGTSTP_HANDLER
24 /// \brief Signal handler for SIGTSTP
25 extern void mytime_sigtstp_handler(int sig
);
29 /// \brief Store the time when (de)compression was started
31 /// The start time is also stored as the time of the first flush.
32 extern void mytime_set_start_time(void);
35 /// \brief Get the number of milliseconds since the operation started
36 extern uint64_t mytime_get_elapsed(void);
39 /// \brief Store the time of when compressor was flushed
40 extern void mytime_set_flush_time(void);
43 /// \brief Get the number of milliseconds until the next flush
45 /// This returns -1 if no timed flushing is used.
47 /// The return value is intended for use with poll().
48 extern int mytime_get_flush_timeout(void);