From e0d767b10057149be7ef502687c4d943582ee2c0 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 8 Apr 2010 04:53:33 +0000 Subject: Changed the recent AbsTime::Epoch code to conform better to the previously existing code. Fixed AbsTime to compile on Windows again. Removed unused and seemingly extraneous serialize() code from AbsTime. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931782 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/windows/Time.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/sys/windows') diff --git a/cpp/src/qpid/sys/windows/Time.cpp b/cpp/src/qpid/sys/windows/Time.cpp index 6b43347ef8..959a7c10fe 100644 --- a/cpp/src/qpid/sys/windows/Time.cpp +++ b/cpp/src/qpid/sys/windows/Time.cpp @@ -47,16 +47,18 @@ AbsTime AbsTime::FarFuture() { return ff; } +AbsTime AbsTime::Epoch() { + AbsTime time_epoch; + time_epoch.timepoint = boost::posix_time::from_time_t(0); + return time_epoch; +} + AbsTime AbsTime::now() { AbsTime time_now; time_now.timepoint = boost::get_system_time(); 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