--[[ Descripttion:追梦 version: Author: Neo,Huang Date: 2023-11-16 21:45:09 LastEditors: Neo,Huang LastEditTime: 2023-11-16 23:20:12 --]] local timer = require("timer") local baseService = require("baseService") local serverLogUtil = require "utils.serverLogUtil" local timerOnlineLog = nil local root = {} -- 在线人数 local function _online_log() serverLogUtil.logOnlineCount() end function root.onStart() timerOnlineLog = timer.timeOut(60, _online_log) end function root.onStop() -- 取消定时器 timerOnlineLog.func = nil end baseService.start(root, ".onlineSrv", true)