mirror of
https://github.com/hufrea/byedpi.git
synced 2025-06-29 18:21:14 +00:00
Fix timer if time diff is zero
This commit is contained in:
parent
d1f1ae0918
commit
0028c8ced8
12
conev.c
12
conev.c
@ -291,14 +291,14 @@ void remove_timer(struct poolhd *pool, struct eval *val)
|
||||
|
||||
struct eval *next_event_tv(struct poolhd *pool, int *offs, int *type)
|
||||
{
|
||||
int ms = 0;
|
||||
if (!pool->tv_start) {
|
||||
return next_event(pool, offs, type, -1);
|
||||
}
|
||||
struct eval *val = 0;
|
||||
|
||||
if (pool->tv_start) {
|
||||
ms = pool->tv_start->tv_ms - time_ms();
|
||||
}
|
||||
if (ms >= 0) {
|
||||
val = next_event(pool, offs, type, ms ? ms : -1);
|
||||
int ms = pool->tv_start->tv_ms - time_ms();
|
||||
if (ms > 0) {
|
||||
val = next_event(pool, offs, type, ms);
|
||||
}
|
||||
else *type = POLLTIMEOUT;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user