mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 19:47:55 +00:00
Remove MessageTimestamp constructor from time_point (#129)
This commit is contained in:
@@ -244,12 +244,6 @@ public:
|
||||
*/
|
||||
MessageTimestamp(std::chrono::milliseconds timestamp, TimestampType type);
|
||||
|
||||
/**
|
||||
* Constructs a timestamp object using a 'time_point'.
|
||||
*/
|
||||
template <typename Clock, typename Duration = typename Clock::duration>
|
||||
MessageTimestamp(std::chrono::time_point<Clock, Duration> timestamp, TimestampType type);
|
||||
|
||||
/**
|
||||
* Gets the timestamp value. If the timestamp was created with a 'time_point',
|
||||
* the duration represents the number of milliseconds since epoch.
|
||||
|
||||
@@ -92,13 +92,6 @@ MessageTimestamp::MessageTimestamp(milliseconds timestamp, TimestampType type)
|
||||
|
||||
}
|
||||
|
||||
template <typename Clock, typename Duration>
|
||||
MessageTimestamp::MessageTimestamp(std::chrono::time_point<Clock, Duration> timestamp, TimestampType type)
|
||||
: timestamp_(std::chrono::duration_cast<std::chrono::milliseconds>(timestamp.time_since_epoch())),
|
||||
type_(type) {
|
||||
|
||||
}
|
||||
|
||||
milliseconds MessageTimestamp::get_timestamp() const {
|
||||
return timestamp_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user