<?php

namespace app\process;

use app\common\service\GameRecordService;
use Workerman\Timer;

/**
 * 定时检查：开启自动创建且无进行中期号时插入新期（全局仅一局）
 */
class GamePeriodAutoTicker
{
    public function onWorkerStart(): void
    {
        Timer::add(15, static function (): void {
            GameRecordService::tickAutoCreate();
        });
    }
}
