Update THANKS.
[xz.git] / src / xz / mytime.h
blob5a3c1e210190814e5f7230d3a3abc401bdd9f0c7
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file mytime.h
4 /// \brief Time handling functions
5 //
6 // Author: Lasse Collin
7 //
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
14 /// \brief Number of milliseconds to between LZMA_SYNC_FLUSHes
15 ///
16 /// If 0, timed flushing is disabled. Otherwise if no more input is available
17 /// and not at the end of the file and at least opt_flush_timeout milliseconds
18 /// has elapsed since the start of compression or the previous flushing
19 /// (LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH), set LZMA_SYNC_FLUSH to flush
20 /// the pending data.
21 extern uint64_t opt_flush_timeout;
24 #ifdef USE_SIGTSTP_HANDLER
25 /// \brief Signal handler for SIGTSTP
26 extern void mytime_sigtstp_handler(int sig);
27 #endif
30 /// \brief Store the time when (de)compression was started
31 ///
32 /// The start time is also stored as the time of the first flush.
33 extern void mytime_set_start_time(void);
36 /// \brief Get the number of milliseconds since the operation started
37 extern uint64_t mytime_get_elapsed(void);
40 /// \brief Store the time of when compressor was flushed
41 extern void mytime_set_flush_time(void);
44 /// \brief Get the number of milliseconds until the next flush
45 ///
46 /// This returns -1 if no timed flushing is used.
47 ///
48 /// The return value is intended for use with poll().
49 extern int mytime_get_flush_timeout(void);