<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                <blockquote class="danger">代碼未經項目實測,僅供參考</blockquote> `config`下新建 <details> <summary>timer.php</summary> ~~~ <?php return [ [ //執行周期(毫秒) 'tally' => 2000, //事件名稱-注意大小寫 'event' => 'Timer', //是否等待事件-事件業務完成后開始周期計算 'wait' => true ] ]; ~~~ </details> `app\subscribe`下新建 <details> <summary>Timer.php</summary> ~~~ <?php namespace app\subscribe; //定時任務事件監聽 class Timer { /** * 命名規范是on+事件標識,所以該方法的事件名稱為event('Timer') */ public function onTimer() { var_dump(time()); } } ~~~ </details> 啟動后輸出如下 ![](https://img.kancloud.cn/d1/a2/d1a2b8d9bfc74d77c00e428c56d5f8f6_377x155.png) 實現過程在`app\listener\SwooleBoot.php`:`private function initTimer()` 等待模式是通過新建一個`Process`通過`\Co::sleep`完成,非等待模式為`swoole_timer_tick`.兩者均為毫秒級控制.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看