long l1 = System.currentTimeMillis();
Map<Integer, String> recipients = new HashMap<Integer, String>();
Integer groupId = taskInst.getGroupId();
Group group = groupManager.getGroupById(groupId);
taskInst.setGroupName(group.getName());
List<UserGroup> userGroups = userGroupManager
.getListByGroupId(groupId);
for (UserGroup userGroup : userGroups) {
User user = userManager.getUser(userGroup.getUserId());
recipients.put(user.getId(), user.getFullName());
}
long l2 = System.currentTimeMillis();
System.out.println(l2 - l1);
代码片段 -- Java计算代码执行消耗时间
最新推荐文章于 2024-01-10 19:11:28 发布