Rizin
unix-like reverse engineering framework and cli tools
|
Time handling functions. More...
Go to the source code of this file.
Functions | |
void | mytime_set_start_time (void) |
Store the time when (de)compression was started. More... | |
uint64_t | mytime_get_elapsed (void) |
Get the number of milliseconds since the operation started. More... | |
void | mytime_set_flush_time (void) |
Store the time of when compressor was flushed. More... | |
int | mytime_get_flush_timeout (void) |
Get the number of milliseconds until the next flush. More... | |
Variables | |
uint64_t | opt_flush_timeout |
Number of milliseconds to between LZMA_SYNC_FLUSHes. More... | |
Time handling functions.
Definition in file mytime.h.
uint64_t mytime_get_elapsed | ( | void | ) |
Get the number of milliseconds since the operation started.
Definition at line 59 of file mytime.c.
References mytime_now(), and start_time.
Referenced by message_progress_update(), and progress_flush().
int mytime_get_flush_timeout | ( | void | ) |
Get the number of milliseconds until the next flush.
This returns -1 if no timed flushing is used.
The return value is intended for use with poll().
Definition at line 74 of file mytime.c.
References int, INT_MAX, MODE_COMPRESS, mytime_now(), next_flush, opt_flush_timeout, and opt_mode.
Referenced by io_read().
void mytime_set_flush_time | ( | void | ) |
Store the time of when compressor was flushed.
Definition at line 66 of file mytime.c.
References mytime_now(), next_flush, and opt_flush_timeout.
Referenced by io_read().
void mytime_set_start_time | ( | void | ) |
Store the time when (de)compression was started.
The start time is also stored as the time of the first flush.
Definition at line 51 of file mytime.c.
References mytime_now(), and start_time.
Referenced by coder_run().
|
extern |
Number of milliseconds to between LZMA_SYNC_FLUSHes.
If 0, timed flushing is disabled. Otherwise if no more input is available and not at the end of the file and at least opt_flush_timeout milliseconds has elapsed since the start of compression or the previous flushing (LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH), set LZMA_SYNC_FLUSH to flush the pending data.
Definition at line 19 of file mytime.c.
Referenced by coder_init(), mytime_get_flush_timeout(), mytime_set_flush_time(), and parse_real().