Fix patty_timer_expired()

Fix patty_timer_expired() to only check the tv_sec field for a value <=0
when testing for expiry
This commit is contained in:
XANTRONIX Development 2020-07-31 01:06:48 -04:00 committed by XANTRONIX Industrial
parent 08d7594433
commit d6fbea1824

View file

@ -1,7 +1,7 @@
#include <patty/timer.h>
int patty_timer_expired(struct timeval *timer) {
return (timer->tv_sec <= 0 && timer->tv_usec == 0)? 1: 0;
return timer->tv_sec <= 0? 1: 0;
}
void patty_timer_cancel(struct timeval *timer) {