<?php
/**
 * 每分钟执行一次
 */
if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli') {
    die("The program runs only in CLI mode!");
}
$timestamp = time();
$sid =$lid =1;
include_once dirname(__FILE__) . "/crontab.inc.php";
include_once dirname(__FILE__) . "/../com.php";
require_once dirname(__FILE__) . '/../vendor/autoload.php';

set_time_limit(0);
// G(小时，24 小时格式，没有前导零，0 到 23), i(有前导零的分钟数，00 到 59>)
$time   = date('Gi', $timestamp);
$day    = date("j", $timestamp); // 月份中的第几天，没有前导零(1到31)
$week   = date('w', $timestamp);//星期中的星期几 周日是0 周一是1 依次排下去
$minute = date('i', $timestamp);
define('CURRENT_TIMESTAMP', $timestamp);
/*****统计在线在玩 Start*****/
$onlineNum = oo::commonOprModel('recordonline')->getAliMonitor('onlineStatistics.php line:'.__LINE__);
oo::commonOprModel('recordonline')->setOnlenCount(timeFuns::todaySecond(), $onlineNum);//每分钟在线用户统计
if( $minute % 5 == 0 ){
    !IS_DEBUF && oo::commonOprModel('recordonline')->crazyRecord($timestamp, $onlineNum);
}

/*****统计Fox在线数*****/
oo::commonOprModel('recordonline')->saveFoxRealTimeOnline($timestamp, $onlineNum);



die('end');
