diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
commit | 207df6fc406e81bfeebdff7f404bd242ff3f099f (patch) | |
tree | a1a796b056909dd0a04ffec163db9363a8757808 /src/relative_time.cc | |
parent | Releasing progress-linux version 0.11.2-1~progress7.99u1. (diff) | |
download | lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip |
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/relative_time.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/relative_time.cc b/src/relative_time.cc index e6f1118..6024dc5 100644 --- a/src/relative_time.cc +++ b/src/relative_time.cc @@ -31,6 +31,7 @@ #include "relative_time.hh" +#include "base/lnav_log.hh" #include "base/time_util.hh" #include "config.h" #include "pcrepp/pcre2pp.hh" @@ -294,7 +295,8 @@ relative_time::from_str(string_fragment str) bool found = false; for (int lpc = 0; lpc < RTT__MAX && !found; lpc++) { - static thread_local auto md = lnav::pcre2pp::match_data::unitialized(); + static thread_local auto md + = lnav::pcre2pp::match_data::unitialized(); token_t token = (token_t) lpc; auto match_res = MATCHERS[lpc] @@ -1115,7 +1117,7 @@ relative_time::to_microseconds() const etm.et_tm.tm_min = this->rt_field[RTF_MINUTES].value; etm.et_tm.tm_sec = this->rt_field[RTF_SECONDS].value; - auto epoch_secs = std::chrono::seconds(tm2sec(&etm.et_tm)); + auto epoch_secs = std::chrono::seconds(etm.to_timeval().tv_sec); retval = std::chrono::duration_cast<std::chrono::microseconds>(epoch_secs) .count(); |