diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/sys/posix/Time.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/sys/windows/Time.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/posix/Time.cpp b/cpp/src/qpid/sys/posix/Time.cpp index 0734abd1df..5e8f1aca0f 100644 --- a/cpp/src/qpid/sys/posix/Time.cpp +++ b/cpp/src/qpid/sys/posix/Time.cpp @@ -51,6 +51,8 @@ AbsTime AbsTime::now() { return time_now; } +AbsTime AbsTime::epoch() { return AbsTime(); } + Duration::Duration(const AbsTime& time0) : nanosecs(time0.timepoint) {} diff --git a/cpp/src/qpid/sys/windows/Time.cpp b/cpp/src/qpid/sys/windows/Time.cpp index 1d7b94e8d7..6b43347ef8 100644 --- a/cpp/src/qpid/sys/windows/Time.cpp +++ b/cpp/src/qpid/sys/windows/Time.cpp @@ -53,6 +53,10 @@ AbsTime AbsTime::now() { return time_now; } +AbsTime AbsTime::epoch() { + return AbsTime(boost::posix_time::from_time_t(0)); +} + Duration::Duration(const AbsTime& time0) : nanosecs(0) { time_period p(ptime(min_date_time), time0.timepoint); nanosecs = p.length().total_nanoseconds(); |