//else if(unlikely(t1.tv_sec < t2.tv_sec)) ret = -1;
//else if(likely(t1.tv_nsec > t2.tv_nsec)) ret = 1;
//else if(unlikely(t1.tv_nsec < t2.tv_nsec)) ret = -1;
- if(likely(t1.tv_sec - t2.tv_sec > 0)) ret = 1;
- else if(unlikely(t1.tv_sec - t2.tv_sec < 0)) ret = -1;
- else if(likely(t1.tv_nsec - t2.tv_nsec > 0)) ret = 1;
- else if(unlikely(t1.tv_nsec - t2.tv_nsec < 0)) ret = -1;
+ if(likely((long)t1.tv_sec - (long)t2.tv_sec > 0)) ret = 1;
+ else if(unlikely((long)t1.tv_sec - (long)t2.tv_sec < 0)) ret = -1;
+ else if(likely((long)t1.tv_nsec - (long)t2.tv_nsec > 0)) ret = 1;
+ else if(unlikely((long)t1.tv_nsec - (long)t2.tv_nsec < 0)) ret = -1;
return ret;
}