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.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12
13
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;
22
23
24 /// \brief Store the time when (de)compression was started
25 ///
26 /// The start time is also stored as the time of the first flush.
27 extern void mytime_set_start_time(void);
28
29
30 /// \brief Get the number of milliseconds since the operation started
31 extern uint64_t mytime_get_elapsed(void);
32
33
34 /// \brief Store the time of when compressor was flushed
35 extern void mytime_set_flush_time(void);
36
37
38 /// \brief Get the number of milliseconds until the next flush
39 ///
40 /// This returns -1 if no timed flushing is used.
41 ///
42 /// The return value is intended for use with poll().
43 extern int mytime_get_flush_timeout(void);