INNER CODE UNIT · JavaScript

expireTime

shadowsocks/shadowsocks-manager · plugins/account/index.js:544

      expireTime = timePeriod[orderType] * limit + Date.now();
    } else {
      expireTime += timePeriod[orderType] * limit;
    }
    let countTime = timePeriod[account.type];
    accountData.create = expireTime - countTime;
    accountData.limit = 1;
    while(accountData.create >= Date.now()) {
      accountData.limit += 1;
      accountData.create -= countTime;
    }
    await knex('account_plugin').update({
      data: JSON.stringify(accountData),
    }).where({ id: accountId });
    await accountFlow.edit(accountId);
    return;
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…