Use system_clock instead of local_t
This commit is contained in:
parent
2833ce4e68
commit
0083fa8a94
src/io
@ -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>
|
||||
|
@ -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; }
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user