summaryrefslogtreecommitdiff
path: root/indra/llcommon/lldate.cpp
diff options
context:
space:
mode:
authorKent Quirk <q@lindenlab.com>2009-01-05 18:59:12 +0000
committerKent Quirk <q@lindenlab.com>2009-01-05 18:59:12 +0000
commit667ca55bad0108c4bdf8f007b89e1a52fc766aad (patch)
tree7bd62ac8d9af079c3994565f3f200ccc250bbc28 /indra/llcommon/lldate.cpp
parent95f365789f4cebc7bd97ccefd538f14d481a8373 (diff)
svn merge -r106715:HEAD svn+ssh://svn.lindenlab.com/svn/linden/branches/q/notifications-merge-r106715 . QAR-1149 -- Final merge of notifications to trunk.
Diffstat (limited to 'indra/llcommon/lldate.cpp')
-rw-r--r--indra/llcommon/lldate.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index 6b4bd0d7ef..ff1b6c5334 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -36,9 +36,12 @@
#include "apr_time.h"
+#include <time.h>
#include <iomanip>
#include <sstream>
+#include "lltimer.h"
+
static const F64 DATE_EPOCH = 0.0;
static const F64 LL_APR_USEC_PER_SEC = 1000000.0;
@@ -122,7 +125,7 @@ void LLDate::toHTTPDateStream(std::ostream& s) const
<< " GMT";
// RFC 1123 date does not use microseconds
- llinfos << "Date in RFC 1123 format is " << s << llendl;
+ //llinfos << "Date in RFC 1123 format is " << s << llendl;
}
void LLDate::toStream(std::ostream& s) const
@@ -239,6 +242,17 @@ bool operator!=(const LLDate& first, const LLDate& second)
return (first.secondsSinceEpoch() != second.secondsSinceEpoch());
}
+/* static */ LLDate LLDate::now()
+{
+ // time() returns seconds, we want fractions of a second, which LLTimer provides --RN
+ return LLDate(LLTimer::getTotalSeconds());
+}
+
+bool LLDate::operator<(const LLDate& rhs) const
+{
+ return mSecondsSinceEpoch < rhs.mSecondsSinceEpoch;
+}
+
std::ostream& operator<<(std::ostream& s, const LLDate& date)
{
date.toStream(s);
@@ -250,3 +264,4 @@ std::istream& operator>>(std::istream& s, LLDate& date)
date.fromStream(s);
return s;
}
+