judge changed
parent
5e6233ab69
commit
8ad9d6961b
2
HISTORY
2
HISTORY
|
|
@ -1,4 +1,4 @@
|
||||||
Version 1.08 2014-10-08
|
Version 1.08 2014-10-09
|
||||||
* sched_thread.c: calculate next_call_time correctly
|
* sched_thread.c: calculate next_call_time correctly
|
||||||
|
|
||||||
Version 1.07 2014-09-16
|
Version 1.07 2014-09-16
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,6 @@ static void *sched_thread_entrance(void *args)
|
||||||
ScheduleEntry *pUntil;
|
ScheduleEntry *pUntil;
|
||||||
int exec_count;
|
int exec_count;
|
||||||
int i;
|
int i;
|
||||||
int sleep_time;
|
|
||||||
|
|
||||||
pContext = (ScheduleContext *)args;
|
pContext = (ScheduleContext *)args;
|
||||||
if (sched_init_entries(&(pContext->scheduleArray)) != 0)
|
if (sched_init_entries(&(pContext->scheduleArray)) != 0)
|
||||||
|
|
@ -291,22 +290,16 @@ static void *sched_thread_entrance(void *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_current_time = time(NULL);
|
g_current_time = time(NULL);
|
||||||
sleep_time = pContext->head->next_call_time - g_current_time;
|
while (pContext->head->next_call_time > g_current_time &&
|
||||||
|
*(pContext->pcontinue_flag))
|
||||||
/*
|
{
|
||||||
//fprintf(stderr, "count=%d, sleep_time=%d\n", \
|
sleep(1);
|
||||||
pContext->scheduleArray.count, sleep_time);
|
g_current_time = time(NULL);
|
||||||
*/
|
if (sched_check_waiting(pContext) == 0)
|
||||||
while (sleep_time > 0 && *(pContext->pcontinue_flag))
|
{
|
||||||
{
|
break;
|
||||||
sleep(1);
|
}
|
||||||
g_current_time = time(NULL);
|
}
|
||||||
if (sched_check_waiting(pContext) == 0)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
sleep_time--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(*(pContext->pcontinue_flag)))
|
if (!(*(pContext->pcontinue_flag)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue