Merge pull request #415 from ggtakec/master

Fixed a bug about stat_cache_expire - #382
This commit is contained in:
Takeshi Nakatani 2016-05-14 18:14:56 +09:00
commit c2b7a7e453

View File

@ -104,7 +104,9 @@ inline int CompareStatCacheTime(struct timespec& ts1, struct timespec& ts2)
inline bool IsExpireStatCacheTime(const struct timespec& ts, const time_t& expire)
{
return ((ts.tv_sec + expire) < time(NULL));
struct timespec nowts;
SetStatCacheTime(nowts);
return ((ts.tv_sec + expire) < nowts.tv_sec);
}
//