RaspberrPi project source code
guowenxue
17 hours ago 4291c22ef445b8f94d2bcf1a7a3f531d3d9f6121
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