This commit is contained in:
aozhiwei 2023-12-08 11:24:04 +08:00
parent 1967a9836c
commit 4945153670
2 changed files with 7 additions and 4 deletions

View File

@ -86,11 +86,11 @@ namespace f8
f8::MsgQueue::Instance()->Update();
DispatchNetMsg();
user_app->Update(delta_time);
Schedule();
a8::tick_t end_tick = a8::XGetTickCount();
//if (end_tick - begin_tick > PerfMonitor::Instance()->max_run_delay_time) {
//PerfMonitor::Instance()->max_run_delay_time = end_tick - begin_tick;
//}
if (end_tick - begin_tick > max_run_delay_time_) {
max_run_delay_time_ = end_tick - begin_tick;
}
Schedule();
delta_time = end_tick - begin_tick;
}
UnInit();

View File

@ -61,6 +61,8 @@ namespace f8
int GetArgc() { return argc_; }
long long GetMsgNodeSize() { return msgnode_size_; }
long long GetWorkingMsgNodeSize() { return working_msgnode_size_; }
long long GetMaxRunDelayTime() { return max_run_delay_time_; }
void ResetMaxRunDelayTime() { max_run_delay_time_ = 0; }
private:
bool Init();
@ -78,6 +80,7 @@ namespace f8
int exit_code_ = 0;
volatile bool terminated_ = false;
int nowtime_ = 0;
long long max_run_delay_time_ = 0;
int zone_id_ = 0;
int node_id_ = 0;