diff options
author | Alan Conway <aconway@apache.org> | 2010-04-07 19:51:09 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-04-07 19:51:09 +0000 |
commit | a98f0cfe299d147366c8baa26840b5100b8dc0b9 (patch) | |
tree | 5fde595fe6a04c9820e7e4a2e038bf20f551d061 /cpp/src/qpid/sys/windows/Time.cpp | |
parent | 00e14b01033ae8c33399bc6ebfd28930498b2533 (diff) | |
download | qpid-python-a98f0cfe299d147366c8baa26840b5100b8dc0b9.tar.gz |
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
Diffstat (limited to 'cpp/src/qpid/sys/windows/Time.cpp')
-rw-r--r-- | cpp/src/qpid/sys/windows/Time.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |