1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Time handling functions
6 // Author: Lasse Collin
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
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
21 extern uint64_t opt_flush_timeout;
24 /// \brief True when flushing is needed due to expired timeout
25 extern bool flush_needed;
28 /// \brief Store the time when (de)compression was started
30 /// The start time is also stored as the time of the first flush.
31 extern void mytime_set_start_time(void);
34 /// \brief Get the number of milliseconds since the operation started
35 extern uint64_t mytime_get_elapsed(void);
38 /// \brief Store the time of when compressor was flushed
39 extern void mytime_set_flush_time(void);
42 /// \brief Get the number of milliseconds until the next flush
44 /// This returns -1 if no timed flushing is used.
46 /// The return value is inteded for use with poll().
47 extern int mytime_get_flush_timeout(void);