summaryrefslogtreecommitdiff
path: root/indra/newview/llrecentpeople.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-09-27 19:54:10 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-09-27 19:54:10 +0100
commita84ee929a5221aec07bcc93815ca6c57bb8ab6bb (patch)
treeecf9694b9e772161b67c8b0935362b0e05cc7c7d /indra/newview/llrecentpeople.cpp
parent4d4255c27b45ed5e32fe7c4870e2ce3ed10cb140 (diff)
parent58aef8beaf79dc83546a7b080014ca5030733ac8 (diff)
merge
Diffstat (limited to 'indra/newview/llrecentpeople.cpp')
-rw-r--r--indra/newview/llrecentpeople.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp
index 7689cd1a52..83b0c4f1bf 100644
--- a/indra/newview/llrecentpeople.cpp
+++ b/indra/newview/llrecentpeople.cpp
@@ -126,3 +126,33 @@ bool LLRecentPeople::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
add(event->getValue().asUUID());
return true;
}
+
+void LLRecentPeople::updateAvatarsArrivalTime(uuid_vec_t& uuids)
+{
+ id_to_time_map_t buf = mAvatarsArrivalTime;
+ mAvatarsArrivalTime.clear();
+
+ for (uuid_vec_t::const_iterator id_it = uuids.begin(); id_it != uuids.end(); ++id_it)
+ {
+ if (buf.find(*id_it) != buf.end())
+ {
+ mAvatarsArrivalTime[*id_it] = buf[*id_it];
+ }
+ else
+ {
+ mAvatarsArrivalTime[*id_it] = LLDate::now().secondsSinceEpoch();
+ }
+ }
+}
+
+F32 LLRecentPeople::getArrivalTimeByID(const LLUUID& id)
+{
+ id_to_time_map_t::const_iterator it = mAvatarsArrivalTime.find(id);
+
+ if (it != mAvatarsArrivalTime.end())
+ {
+ return it->second;
+ }
+ return LLDate::now().secondsSinceEpoch();
+}
+