Use system_clock instead of local_t

This commit is contained in:
Tyler Neely 2022-08-11 15:28:23 +00:00
parent 2833ce4e68
commit 0083fa8a94
3 changed files with 6 additions and 3 deletions

View File

@ -11,8 +11,12 @@
#pragma once
#include "io/transport.hpp"
namespace memgraph::io::thrift {
using memgraph::io::Address;
class ThriftHandle {
public:
template <Message Request, Message Response>

View File

@ -56,8 +56,7 @@ class ThriftTransport {
Time Now() const {
auto nano_time = std::chrono::system_clock::now();
auto micros = std::chrono::duration_cast<std::chrono::milliseconds>(nano_time);
return Time::now();
return std::chrono::time_point_cast<std::chrono::microseconds>(nano_time);
}
bool ShouldShutDown() const { return false; }

View File

@ -16,6 +16,6 @@
namespace memgraph::io {
using Duration = std::chrono::microseconds;
using Time = std::chrono::time_point<std::chrono::local_t, Duration>;
using Time = std::chrono::time_point<std::chrono::system_clock, Duration>;
} // namespace memgraph::io