From b56e7cd12b30fbb891e1947fb3a0eef06dc7ab89 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 29 Aug 2017 00:03:54 +0300 Subject: Use system_clock instead of timestamp::clock --- libbutl/timestamp.cxx | 2 +- 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 (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 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 @@ -89,7 +89,7 @@ read_time (const path& p, const T& s, size_t n) { vector 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); -- cgit v1.1