summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/windows
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-04-08 04:53:33 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-04-08 04:53:33 +0000
commite0d767b10057149be7ef502687c4d943582ee2c0 (patch)
treeb9ee19d430056822c6c5cd0e83f9caa747d5d1ed /cpp/src/qpid/sys/windows
parentb799ad84fe13f0573a3423b2097c8931859d16eb (diff)
downloadqpid-python-e0d767b10057149be7ef502687c4d943582ee2c0.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/sys/windows')
-rw-r--r--cpp/src/qpid/sys/windows/Time.cpp10
1 files changed, 6 insertions, 4 deletions
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();