export function getCurBattleSeqFromTime(timeCfg: any[]) {
  const now = Math.floor(Date.now() / 1000);

  if (!timeCfg.length || !timeCfg[0]?.stime || timeCfg[0].stime > now) return 1;

  for (let i = 1;i < timeCfg.length;i++) {
    const item = timeCfg[i];
    if (item.stime > now && timeCfg[i - 1].stime <= now) {
      return Math.min(i + 1, timeCfg.length);
    }
  }
  return timeCfg.length;
}
