package jetbrains.buildServer.serverSide; import jetbrains.buildServer.users.User; import java.util.Date; /** * @author Eugene Petrenko * Created: 31.03.2010 21:04:02 */ public class UserInfo { private final User myUser; private Date myLastAccess = new Date(); public UserInfo(User user) { myUser = user; } public Date getLastAccess() { return myLastAccess; } public void ping() { myLastAccess = new Date(); } public boolean isIdle(Date date) { return myLastAccess.getTime() + 1000L * 60L * 10 < date.getTime(); } }