You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/05/19 20:18:04 UTC
svn commit: r776402 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util: Date.cpp
Date.h
Author: tabish
Date: Tue May 19 18:18:03 2009
New Revision: 776402
URL: http://svn.apache.org/viewvc?rev=776402&view=rev
Log:
Code cleanup and some initial refactoring to make the future work needed a bit easier.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp?rev=776402&r1=776401&r2=776402&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp Tue May 19 18:18:03 2009
@@ -27,6 +27,25 @@
using namespace decaf::lang::exceptions;
////////////////////////////////////////////////////////////////////////////////
+Date::Date(){
+ time = getCurrentTimeMilliseconds();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+Date::Date( long long milliseconds ){
+ this->time = milliseconds;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+Date::Date( const Date& source ){
+ (*this) = source;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+Date::~Date() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
long long Date::getCurrentTimeMilliseconds(){
return apr_time_now() / 1000;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.h?rev=776402&r1=776401&r2=776402&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.h Tue May 19 18:18:03 2009
@@ -26,9 +26,10 @@
/**
* Wrapper class around a time value in milliseconds. This
* class is comparable to Java's java.util.Date class.
+ *
+ * @since 1.0
*/
- class DECAF_API Date
- {
+ class DECAF_API Date {
private:
/**
@@ -41,26 +42,21 @@
/**
* Default constructor - sets time to now.
*/
- Date(){
- time = getCurrentTimeMilliseconds();
- }
+ Date();
/**
* Constructs the date with a given time value.
* @param milliseconds The time in milliseconds;
*/
- Date( long long milliseconds ){
- this->time = milliseconds;
- }
+ Date( long long milliseconds );
/**
* Copy constructor.
+ * @param source The Date instance to copy into this one.
*/
- Date( const Date& source ){
- (*this) = source;
- }
+ Date( const Date& source );
- virtual ~Date(){}
+ virtual ~Date();
/**
* Gets the underlying time.