RaspberrPi project source code
guowenxue
18 hours ago 9e2630a8f3887df3d8f11ee6a27d0d34b331ef28
project/booster/util_proc.h
@@ -86,4 +86,20 @@
    return ;
}
static inline int check_timeout(time_t *last_time, int interval)
{
    int                  timeout = 0;
    time_t               now;
    time(&now);
    if( difftime(now, *last_time)>interval )
    {
        timeout = 1;
        *last_time = now;
    }
    return timeout;
}
#endif