// 根据注册时间计算整个活动到期时间和七天任务结束时间//
    public void calculateActiveOverTime(int loginTime)
    {
        DateTime dt       = TimeKit.getDateTime(loginTime);
        DateTime dt_start = new DateTime(dt.Year, dt.Month, dt.Day, 0, 0, 0);

        this.activeEndTime       = TimeKit.timeSecond(TimeKit.getTimeMillis(dt_start)) + 7 * 86400 + 2 * 86400;
        this.activeMissonEndTime = TimeKit.timeSecond(TimeKit.getTimeMillis(dt_start)) + 7 * 86400;
    }
Beispiel #2
0
 private void updateFilter(Queue <string> filter)
 {
     for (int i = 0; i < filter.Count; i++)
     {
         string[] tmp        = filter.Peek().Split('&');
         long     filterTime = Convert.ToInt64(tmp[1]);
         if (TimeKit.timeSecond(TimeKit.getMillisTime()) - TimeKit.timeSecond(filterTime) > 300)            //超过5分钟,移除
         {
             filter.Dequeue();
         }
     }
 }