diff options
author | Andrew Stitcher <astitcher@apache.org> | 2010-04-08 05:07:08 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2010-04-08 05:07:08 +0000 |
commit | 1c949f8f54d3ede6b52fcfa63f702f9f154f8655 (patch) | |
tree | 01e3626b60cb21f11ea229cc5a886b0274c526a5 /cpp | |
parent | e0d767b10057149be7ef502687c4d943582ee2c0 (diff) | |
download | qpid-python-1c949f8f54d3ede6b52fcfa63f702f9f154f8655.tar.gz |
Remove some clunky accessors for AbsTime on Windows and replace by making Condition
a friend class of AbsTime.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931783 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/qpid/sys/Time.h | 2 | ||||
-rwxr-xr-x | cpp/include/qpid/sys/windows/Condition.h | 5 | ||||
-rw-r--r-- | cpp/src/qpid/sys/windows/Time.cpp | 4 |
3 files changed, 2 insertions, 9 deletions
diff --git a/cpp/include/qpid/sys/Time.h b/cpp/include/qpid/sys/Time.h index 7c4bf75b8b..f21a0d8c75 100644 --- a/cpp/include/qpid/sys/Time.h +++ b/cpp/include/qpid/sys/Time.h @@ -84,6 +84,7 @@ class Duration; */ class AbsTime { friend class Duration; + friend class Condition; TimePrivate timepoint; @@ -98,7 +99,6 @@ public: QPID_COMMON_EXTERN static AbsTime FarFuture(); QPID_COMMON_EXTERN static AbsTime Epoch(); - const TimePrivate& getPrivate(void) const { return timepoint; } bool operator==(const AbsTime& t) const { return t.timepoint == timepoint; } friend bool operator<(const AbsTime& a, const AbsTime& b); diff --git a/cpp/include/qpid/sys/windows/Condition.h b/cpp/include/qpid/sys/windows/Condition.h index 979fae9b0a..cd5aebbf09 100755 --- a/cpp/include/qpid/sys/windows/Condition.h +++ b/cpp/include/qpid/sys/windows/Condition.h @@ -34,9 +34,6 @@ namespace qpid { namespace sys { -// Private Time related implementation details -void toPtime(boost::posix_time::ptime& pt, const AbsTime& t); - /** * A condition variable for thread synchronization. */ @@ -65,7 +62,7 @@ void Condition::wait(Mutex& mutex) { } bool Condition::wait(Mutex& mutex, const AbsTime& absoluteTime){ - return condition.timed_wait(mutex.mutex, absoluteTime.getPrivate()); + return condition.timed_wait(mutex.mutex, absoluteTime.timepoint); } void Condition::notify(){ diff --git a/cpp/src/qpid/sys/windows/Time.cpp b/cpp/src/qpid/sys/windows/Time.cpp index 959a7c10fe..8d34c937ef 100644 --- a/cpp/src/qpid/sys/windows/Time.cpp +++ b/cpp/src/qpid/sys/windows/Time.cpp @@ -79,10 +79,6 @@ std::ostream& operator<<(std::ostream& o, const AbsTime& t) { } -void toPtime(ptime& pt, const AbsTime& t) { - pt = t.getPrivate(); -} - void sleep(int secs) { ::Sleep(secs * 1000); } |