diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-08-29 00:03:54 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-08-29 00:03:54 +0300 |
commit | b56e7cd12b30fbb891e1947fb3a0eef06dc7ab89 (patch) | |
tree | 79eb344e27e119f1f04e9f723c9c10bc87446dbc | |
parent | a475a20e726250eca0a24ab26626a52fbc058b6a (diff) |
Use system_clock instead of timestamp::clock
-rw-r--r-- | libbutl/timestamp.cxx | 2 | ||||
-rw-r--r-- | tests/fdstream/driver.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libbutl/timestamp.cxx b/libbutl/timestamp.cxx index eb4b5ce..b712b0c 100644 --- a/libbutl/timestamp.cxx +++ b/libbutl/timestamp.cxx @@ -631,7 +631,7 @@ namespace butl if (time == -1) throw_generic_error (errno); - return timestamp::clock::from_time_t (time) + + return system_clock::from_time_t (time) + chrono::duration_cast<duration> (t.second); } } diff --git a/tests/fdstream/driver.cxx b/tests/fdstream/driver.cxx index 41a39b0..42414bc 100644 --- a/tests/fdstream/driver.cxx +++ b/tests/fdstream/driver.cxx @@ -67,7 +67,7 @@ template <typename S, typename T> static duration write_time (const path& p, const T& s, size_t n) { - timestamp t (timestamp::clock::now ()); + timestamp t (system_clock::now ()); S os (p.string (), ofstream::out); os.exceptions (S::failbit | S::badbit); @@ -80,7 +80,7 @@ write_time (const path& p, const T& s, size_t n) } os.close (); - return timestamp::clock::now () - t; + return system_clock::now () - t; } template <typename S, typename T> @@ -89,7 +89,7 @@ read_time (const path& p, const T& s, size_t n) { vector<T> v (n); - timestamp t (timestamp::clock::now ()); + timestamp t (system_clock::now ()); S is (p.string (), ofstream::in); is.exceptions (S::failbit | S::badbit); @@ -99,7 +99,7 @@ read_time (const path& p, const T& s, size_t n) assert (is.eof ()); is.close (); - duration d (timestamp::clock::now () - t); + duration d (system_clock::now () - t); for (const auto& ve: v) assert (ve == s); |