减少任务调度的Cost日志

This commit is contained in:
大石头X2 2016-12-15 16:35:38 +08:00
parent 433806b139
commit ed59ad12b4
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ bool Task::Execute(UInt64 now)
// 累加任务执行次数和时间
Times++;
int ct = tc.Elapsed();
if(ct < 0) debug_printf("cost = %d \r\n", ct);
//if(ct < 0) debug_printf("cost = %d \r\n", ct);
ct -= SleepTime;
if(ct > MaxCost) MaxCost = ct;
@ -79,7 +79,7 @@ bool Task::Execute(UInt64 now)
CostMs = Cost / 1000;
#if DEBUG
if(ct > 500000) debug_printf("Task::Execute 任务 %d [%d] 执行时间过长 %dus 睡眠 %dus\r\n", ID, Times, ct, SleepTime);
//if(ct > 500000) debug_printf("Task::Execute 任务 %d [%d] 执行时间过长 %dus 睡眠 %dus\r\n", ID, Times, ct, SleepTime);
#endif
// 如果只是一次性任务,在这里清理