sched_thread.c: calculate next_call_time correctly
parent
07d9cfa9b8
commit
5e6233ab69
2
HISTORY
2
HISTORY
|
|
@ -1,3 +1,5 @@
|
|||
Version 1.08 2014-10-08
|
||||
* sched_thread.c: calculate next_call_time correctly
|
||||
|
||||
Version 1.07 2014-09-16
|
||||
* increment alloc task buffer
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
Name: libfastcommon
|
||||
Version: 1.0.7
|
||||
Version: 1.0.8
|
||||
Release: 1%{?dist}
|
||||
Summary: c common functions library extracted from my open source projects FastDFS
|
||||
License: GPL
|
||||
|
|
|
|||
|
|
@ -320,8 +320,10 @@ static void *sched_thread_entrance(void *args)
|
|||
{
|
||||
//fprintf(stderr, "exec task id=%d\n", pCurrent->id);
|
||||
pCurrent->task_func(pCurrent->func_args);
|
||||
pCurrent->next_call_time = g_current_time + \
|
||||
pCurrent->interval;
|
||||
do
|
||||
{
|
||||
pCurrent->next_call_time += pCurrent->interval;
|
||||
} while (pCurrent->next_call_time <= g_current_time);
|
||||
pCurrent = pCurrent->next;
|
||||
exec_count++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue