CatapultServer  v0.5.0.1 (Elephant)
CommunicationTimestamps.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/types.h"
23 
24 namespace catapult { namespace timesync {
25 
26 #pragma pack(push, 1)
27 
30  public:
32  CommunicationTimestamps() = default;
33 
35  CommunicationTimestamps(Timestamp sendTimestamp, Timestamp receiveTimestamp)
36  : SendTimestamp(sendTimestamp)
37  , ReceiveTimestamp(receiveTimestamp)
38  {}
39 
40  public:
42  constexpr bool operator==(const CommunicationTimestamps& rhs) const {
44  }
45 
47  constexpr bool operator!=(const CommunicationTimestamps& rhs) const {
48  return !(*this == rhs);
49  }
50 
51  public:
54 
57  };
58 
59 #pragma pack(pop)
60 }}
catapult::timesync::CommunicationTimestamps::CommunicationTimestamps
CommunicationTimestamps(Timestamp sendTimestamp, Timestamp receiveTimestamp)
Creates communication timestamps around sendTimestamp and receiveTimestamp.
Definition: CommunicationTimestamps.h:35
catapult::timesync::CommunicationTimestamps
Represents the network timestamps for sending and receiving a time synchronization request / response...
Definition: CommunicationTimestamps.h:29
catapult::utils::BaseValue< uint64_t, Timestamp_tag >
catapult::timesync::CommunicationTimestamps::operator!=
constexpr bool operator!=(const CommunicationTimestamps &rhs) const
Returns true if these communication timestamps are not equal to rhs.
Definition: CommunicationTimestamps.h:47
catapult::timesync::CommunicationTimestamps::SendTimestamp
Timestamp SendTimestamp
Time when the request/response was sent.
Definition: CommunicationTimestamps.h:53
catapult::timesync::CommunicationTimestamps::ReceiveTimestamp
Timestamp ReceiveTimestamp
Time when the request/response was received.
Definition: CommunicationTimestamps.h:56
catapult::timesync::CommunicationTimestamps::operator==
constexpr bool operator==(const CommunicationTimestamps &rhs) const
Returns true if these communication timestamps are equal to rhs.
Definition: CommunicationTimestamps.h:42
catapult::timesync::CommunicationTimestamps::CommunicationTimestamps
CommunicationTimestamps()=default
Creates default communication timestamps.
types.h
catapult
Definition: AddressExtractionExtension.cpp:28