misc.hh (fstransform-0.9.3-src) | : | misc.hh (fstransform-0.9.4) | ||
---|---|---|---|---|
skipping to change at line 163 | skipping to change at line 163 | |||
* otherwise return ((ft_ull)(t*100 + 0.5)) / 100 | * otherwise return ((ft_ull)(t*100 + 0.5)) / 100 | |||
*/ | */ | |||
ft_ull ff_pretty_number(double t); | ft_ull ff_pretty_number(double t); | |||
/** | /** | |||
* Show progress. logs a message like | * Show progress. logs a message like | |||
* {prefix}progress: {percentage}% done, {bytes_left} bytes{suffix}, estimated { time_left} left" | * {prefix}progress: {percentage}% done, {bytes_left} bytes{suffix}, estimated { time_left} left" | |||
* | * | |||
* if time_left < 0, omits the part "estimated {time_left} left" | * if time_left < 0, omits the part "estimated {time_left} left" | |||
*/ | */ | |||
#define ff_show_progress(log_level, prefix, percentage, bytes_left, suffix, ...) | #define ff_show_progress(log_level, prefix, percentage, bytes_left, suffix, ...) | |||
ff_show_progressl(FT_THIS_FILE, FT_THIS_FUNCTION, FT_THIS_LINE, \ | ff_show_progressl( \ | |||
FT_THIS_FILE, sizeof(FT_THIS_FIL | ||||
E), FT_THIS_FUNCTION, FT_THIS_LINE, \ | ||||
log_level, prefix, percentage, b ytes_left, suffix, __VA_ARGS__) | log_level, prefix, percentage, b ytes_left, suffix, __VA_ARGS__) | |||
/** | /** | |||
* Show progress. logs a message like | * Show progress. logs a message like | |||
* {prefix}progress: {percentage}% done, {bytes_left} bytes{suffix}, estimated { time_left} left" | * {prefix}progress: {percentage}% done, {bytes_left} bytes{suffix}, estimated { time_left} left" | |||
* | * | |||
* if time_left < 0, omits the part "estimated {time_left} left" | * if time_left < 0, omits the part "estimated {time_left} left" | |||
*/ | */ | |||
void ff_show_progressl(const char * caller_file, const char * caller_func, int c | void ff_show_progressl(const char * caller_file, int caller_file_len, | |||
aller_line, | const char * caller_func, int caller_line, | |||
ft_log_level log_level, const char * prefix, double percentage, | ft_log_level log_level, const char * prefix, double percentage, | |||
ft_uoff bytes_left, const char * suffix, double time_left = -1.0) ; | ft_uoff bytes_left, const char * suffix, double time_left = -1.0) ; | |||
FT_NAMESPACE_END | FT_NAMESPACE_END | |||
#endif /* FSTRANSFORM_MISC_HH */ | #endif /* FSTRANSFORM_MISC_HH */ | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 6 lines changed or added |