100 { t.tv_sec =
static_cast<long>(sec); t.tv_usec = usec; }
123 { t.tv_sec = tv->tv_sec; t.tv_usec = tv->tv_usec; }
136#define INT32_MAX INT_MAX
150 { t.tv_sec = time_t(trunc(sec));
152 { t.tv_sec = time_t(
int(sec));
154 t.tv_usec = long((sec - t.tv_sec) * 1000000.0); }
158 { t.tv_sec =
static_cast<long>(sec); t.tv_usec = usec; }
162 { t.tv_sec = tv->tv_sec; t.tv_usec = tv->tv_usec; }
166 { t.tv_sec = time_t(msec/1000);
167 t.tv_usec = long(1000 * (msec % 1000)); }
171 {
return (
double) t.tv_sec + (double) t.tv_usec / 1000000.0; }
175 { sec = t.tv_sec; usec = t.tv_usec; }
179 { tv->tv_sec = t.tv_sec; tv->tv_usec = t.tv_usec; }
183 {
return t.tv_sec * 1000 + t.tv_usec / 1000; }
226 {
return (*
this = *
this + tm); }
230 {
return (*
this = *
this - tm); }
234 {
return (t.tv_usec == 0) ?
SbTime(- t.tv_sec, 0)
235 :
SbTime(- t.tv_sec - 1, 1000000 - t.tv_usec); }
244 { *
this = *
this * s;
return *
this; }
251 {
return (*
this = *
this / s); }
255 {
return getValue() / tm.
getValue(); }
259 {
return *
this - tm * floor(*
this / tm); }
263 {
return (t.tv_sec == tm.t.tv_sec) && (t.tv_usec == tm.t.tv_usec); }
267 {
return ! (*
this == tm); }
270 inline bool operator <(
const SbTime &tm)
const;
272 inline bool operator >(
const SbTime &tm)
const;
274 inline bool operator <=(
const SbTime &tm)
const;
276 inline bool operator >=(
const SbTime &tm)
const;
293 if ((t.tv_sec < tm.t.tv_sec) ||
294 (t.tv_sec == tm.t.tv_sec && t.tv_usec < tm.t.tv_usec))
303 if ((t.tv_sec > tm.t.tv_sec) ||
304 (t.tv_sec == tm.t.tv_sec && t.tv_usec > tm.t.tv_usec))
313 if ((t.tv_sec < tm.t.tv_sec) ||
314 (t.tv_sec == tm.t.tv_sec && t.tv_usec <= tm.t.tv_usec))
323 if ((t.tv_sec > tm.t.tv_sec) ||
324 (t.tv_sec == tm.t.tv_sec && t.tv_usec >= tm.t.tv_usec))
INVENTOR_API bool operator!=(const SbBox3f &b1, const SbBox3f &b2)
INVENTOR_API bool operator==(const SbBox3f &b1, const SbBox3f &b2)
INVENTOR_API SbVec3f operator-(const SbVec3f &v1, const SbVec3f &v2)
INVENTOR_API SbVec3f operator/(const SbVec3f &v, float d)
INVENTOR_API SbVec3f operator*(const SbVec3f &v, float d)
INVENTOR_API SbVec3f operator+(const SbVec3f &v1, const SbVec3f &v2)
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Class for smart character strings.
Class for representation of a time.
bool operator>=(const SbTime &tm) const
Relational operators.
void getValue(struct timeval *tv) const
Get time in a struct timeval.
bool operator>(const SbTime &tm) const
Relational operators.
SbString format(const char *fmt="%S.%i") const
Convert to a string.
SbTime(time_t sec, long usec)
Constructor taking seconds + microseconds.
double getValue() const
Get time in seconds as a double.
SbTime()
Default constructor.
void setMsecValue(unsigned long msec)
Set time from milliseconds.
unsigned long getMsecValue() const
Get time in milliseconds (for Xt).
static SbTime zero()
Get a zero time.
SbTime(double sec)
Constructor taking seconds.
bool operator<(const SbTime &tm) const
Relational operators.
void setToTimeOfDay()
Set to the current time (seconds since Jan 1, 1970).
void setValue(const struct timeval *tv)
Set time from a struct timeval.
bool operator<=(const SbTime &tm) const
Relational operators.
static SbTime max()
Get a time far, far into the future.
void setValue(double sec)
Set time from a double (in seconds).
SbTime(const struct timeval *tv)
Constructors taking timeval.
void setValue(time_t sec, long usec)
Set time from seconds + microseconds.
static SbTime getTimeOfDay()
Get the current time (seconds since Jan 1, 1970).
void getValue(time_t &sec, long &usec) const
Get time in seconds & microseconds.
SbString formatDate(const char *fmt="%A, %D %r") const
Convert to a date string, interpreting the time as seconds since Jan 1, 1970.