@@ -19,11 +19,11 @@ namespace {
19
19
20
20
template <typename SizeType>
21
21
void log_encoder_stats (
22
- std::chrono::time_point<std::chrono::system_clock> start,
22
+ std::chrono::steady_clock::time_point start,
23
23
SizeType decoded_size,
24
24
SizeType encoded_size)
25
25
{
26
- const auto end = std::chrono::system_clock ::now ();
26
+ const auto end = std::chrono::steady_clock ::now ();
27
27
const auto ratio = (static_cast <double >(decoded_size) - encoded_size) / decoded_size;
28
28
29
29
LOGD (
@@ -36,11 +36,11 @@ namespace {
36
36
37
37
template <typename SizeType>
38
38
void log_decoder_stats (
39
- std::chrono::time_point<std::chrono::system_clock> start,
39
+ std::chrono::steady_clock::time_point start,
40
40
SizeType encoded_size,
41
41
SizeType decoded_size)
42
42
{
43
- const auto end = std::chrono::system_clock ::now ();
43
+ const auto end = std::chrono::steady_clock ::now ();
44
44
45
45
LOGD (
46
46
" Decoded {} bytes to {} bytes in {:.2f} seconds" ,
@@ -54,7 +54,7 @@ namespace {
54
54
// ==================================================================================================
55
55
bool Encoder::encode_string (const std::string &decoded, std::string &encoded)
56
56
{
57
- const auto start = std::chrono::system_clock ::now ();
57
+ const auto start = std::chrono::steady_clock ::now ();
58
58
bool successful = false ;
59
59
60
60
std::istringstream input (decoded, s_input_mode);
@@ -79,7 +79,7 @@ bool Encoder::encode_file(
79
79
const std::filesystem::path &decoded,
80
80
const std::filesystem::path &encoded)
81
81
{
82
- const auto start = std::chrono::system_clock ::now ();
82
+ const auto start = std::chrono::steady_clock ::now ();
83
83
bool successful = false ;
84
84
{
85
85
std::ifstream input (decoded, s_input_mode);
@@ -112,7 +112,7 @@ bool BinaryEncoder::encode_internal(std::istream &decoded, std::ostream &encoded
112
112
// ==================================================================================================
113
113
bool Decoder::decode_string (const std::string &encoded, std::string &decoded)
114
114
{
115
- const auto start = std::chrono::system_clock ::now ();
115
+ const auto start = std::chrono::steady_clock ::now ();
116
116
bool successful = false ;
117
117
118
118
std::istringstream input (encoded, s_input_mode);
@@ -137,7 +137,7 @@ bool Decoder::decode_file(
137
137
const std::filesystem::path &encoded,
138
138
const std::filesystem::path &decoded)
139
139
{
140
- const auto start = std::chrono::system_clock ::now ();
140
+ const auto start = std::chrono::steady_clock ::now ();
141
141
bool successful = false ;
142
142
{
143
143
std::ifstream input (encoded, s_input_mode);
0 commit comments