int currentUserCount = userIdAccessTimeMap.size();
for(UserId userId : new ArrayList<UserId>(userIdAccessTimeMap.keySet())) {
Long timeStamp = userIdAccessTimeMap.get(userId);
if(currentTime - timeStamp > PURGE_PERIOD) {
userIdAccessTimeMap.remove(userId);
postEvents.postEvent(new UserStoppedViewingProjectEvent(projectId, userId));
}
}
if(userIdAccessTimeMap.size() != currentUserCount) {
logStats();
}