aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/time.h')
-rw-r--r--include/grpc++/time.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/grpc++/time.h b/include/grpc++/time.h
index 8fb2f8505c..f9b2ce5cab 100644
--- a/include/grpc++/time.h
+++ b/include/grpc++/time.h
@@ -52,22 +52,22 @@ namespace grpc {
template <typename T>
class TimePoint {
public:
- TimePoint(const T& time) { you_need_a_specialization_of_TimePoint(); }
+ TimePoint(const T& time) {
+ you_need_a_specialization_of_TimePoint();
+ }
gpr_timespec raw_time() {
gpr_timespec t;
return t;
}
-
private:
void you_need_a_specialization_of_TimePoint();
};
-template <>
+template<>
class TimePoint<gpr_timespec> {
public:
- TimePoint(const gpr_timespec& time) : time_(time) {}
+ TimePoint(const gpr_timespec& time) : time_(time) { }
gpr_timespec raw_time() { return time_; }
-
private:
gpr_timespec time_;
};
@@ -85,9 +85,6 @@ namespace grpc {
// from and to should be absolute time.
void Timepoint2Timespec(const std::chrono::system_clock::time_point& from,
gpr_timespec* to);
-void TimepointHR2Timespec(
- const std::chrono::high_resolution_clock::time_point& from,
- gpr_timespec* to);
std::chrono::system_clock::time_point Timespec2Timepoint(gpr_timespec t);
@@ -95,10 +92,9 @@ template <>
class TimePoint<std::chrono::system_clock::time_point> {
public:
TimePoint(const std::chrono::system_clock::time_point& time) {
- Timepoint2Timespec(time, &time_);
+ Timepoint2Timespec(time, &time_);
}
gpr_timespec raw_time() const { return time_; }
-
private:
gpr_timespec time_;
};