From a98f0cfe299d147366c8baa26840b5100b8dc0b9 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 7 Apr 2010 19:51:09 +0000 Subject: Added AbsTime::epoch()) constant to Time.h to provide a portable reference time point. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931656 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/windows/Time.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/src/qpid/sys/windows/Time.cpp') 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(); -- cgit v1.2.1