Eliminate TimersRunExpired().

SVN revision: 55890
This commit is contained in:
Kim Woelders 2011-01-05 18:05:54 +00:00
parent be31bb694b
commit 53180ca139
3 changed files with 10 additions and 24 deletions

View File

@ -995,23 +995,18 @@ EventsMain(void)
count, pfds[0].fd, FD_ISSET(pfds[0].fd, &fdset), dt * 1e-3,
time2 * 1e-3);
if (count == 0)
if (count <= 0)
continue; /* Timeout (or error) */
/* Excluding X fd */
for (i = 1; i < nfds; i++)
{
/* We can only get here by timeout in select */
TimersRunExpired();
}
else if (count > 0)
{
/* Excluding X fd */
for (i = 1; i < nfds; i++)
fd = pfds[i].fd;
if ((fd >= 0) && (FD_ISSET(fd, &fdset)))
{
fd = pfds[i].fd;
if ((fd >= 0) && (FD_ISSET(fd, &fdset)))
{
if (EDebug(EDBUG_TYPE_EVENTS))
Eprintf("Event fd %d\n", i);
pfds[i].handler();
}
if (EDebug(EDBUG_TYPE_EVENTS))
Eprintf("Event fd %d\n", i);
pfds[i].handler();
}
}
}

View File

@ -225,14 +225,6 @@ TimersRun(unsigned int t_ms)
return tn;
}
unsigned int
TimersRunExpired(void)
{
if (!q_first) /* I don't think this should ever happen but... */
return 0;
return TimersRun(q_first->at_time);
}
void
TimerDel(Timer * timer)
{

View File

@ -35,7 +35,6 @@ Timer *TimerAdd(double in_time,
void TimerDel(Timer * timer);
void TimerSetInterval(Timer * timer, double dt);
unsigned int TimersRun(unsigned int t_ms);
unsigned int TimersRunExpired(void);
#define TIMER_ADD(timer, in, func, prm) \
timer = TimerAdd(in, func, prm)