20#ifndef INCLUDED_VCL_INC_UNX_SALUNXTIME_H
21#define INCLUDED_VCL_INC_UNX_SALUNXTIME_H
23#if defined LINUX || defined FREEBSD || \
24 defined NETBSD || defined OPENBSD || defined DRAGONFLY
29inline bool operator >= (
const timeval &t1,
const timeval &t2 )
31 if( t1.tv_sec == t2.tv_sec )
32 return t1.tv_usec >= t2.tv_usec;
33 return t1.tv_sec > t2.tv_sec;
36inline bool operator > (
const timeval &t1,
const timeval &t2 )
38 if( t1.tv_sec == t2.tv_sec )
39 return t1.tv_usec > t2.tv_usec;
40 return t1.tv_sec > t2.tv_sec;
45 if( t1.tv_usec < t2.tv_usec )
48 t1.tv_usec += 1000000;
50 t1.tv_sec -= t2.tv_sec;
51 t1.tv_usec -= t2.tv_usec;
57 t1.tv_sec += t2 / 1000;
58 t1.tv_usec += (t2 % 1000) * 1000;
59 if( t1.tv_usec > 1000000 )
62 t1.tv_usec -= 1000000;
67inline timeval
operator - (
const timeval &t1,
const timeval &t2 )
timeval & operator+=(timeval &t1, sal_uIntPtr t2)
timeval operator-(const timeval &t1, const timeval &t2)
bool operator>(const timeval &t1, const timeval &t2)
timeval & operator-=(timeval &t1, const timeval &t2)
bool operator>=(const timeval &t1, const timeval &t2)