base: fix a very theoretical performance problem
[vuplus_dvbapp] / lib / base / ebase.h
index 2a1fe62..d470941 100644 (file)
@@ -22,6 +22,11 @@ static inline bool operator<( const timeval &t1, const timeval &t2 )
        return t1.tv_sec < t2.tv_sec || (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec);
 }
 
+static inline bool operator<=( const timeval &t1, const timeval &t2 )
+{
+       return t1.tv_sec < t2.tv_sec || (t1.tv_sec == t2.tv_sec && t1.tv_usec <= t2.tv_usec);
+}
+
 static inline timeval &operator+=( timeval &t1, const timeval &t2 )
 {
        t1.tv_sec += t2.tv_sec;