mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
优化
This commit is contained in:
@@ -28,8 +28,9 @@ bool AddTask(pTimedTask task)
|
||||
pTimedTask tmp = task_top;
|
||||
while (tmp)
|
||||
{
|
||||
if ((task->prs_time > tmp->prs_time && task->prs_time <= tmp->next->prs_time)
|
||||
|| tmp->next == NULL)
|
||||
if (tmp->next == NULL
|
||||
|| (task->prs_time >= tmp->prs_time
|
||||
&& task->prs_time < tmp->next->prs_time))
|
||||
{
|
||||
task->next = tmp->next;
|
||||
tmp->next = task;
|
||||
|
||||
Reference in New Issue
Block a user