예제 #1
0
 public static synchronized int getNewUsers() {
   return (int) firstVisitors.getSum(300);
 }
예제 #2
0
 public static void add(long userid) {
   if (userid == 0) firstVisitors.add(1);
   else {
     users.putLast(userid, System.currentTimeMillis());
   }
 }