254# define DEFAULT_FORMAT_DATE "%#c"
256# define DEFAULT_FORMAT_DATE "%A, %D %r"
359 if ((t.tv_sec < tm.t.tv_sec) ||
360 (t.tv_sec == tm.t.tv_sec && t.tv_usec < tm.t.tv_usec))
369 if ((t.tv_sec > tm.t.tv_sec) ||
370 (t.tv_sec == tm.t.tv_sec && t.tv_usec > tm.t.tv_usec))
379 if ((t.tv_sec < tm.t.tv_sec) ||
380 (t.tv_sec == tm.t.tv_sec && t.tv_usec <= tm.t.tv_usec))
389 if ((t.tv_sec > tm.t.tv_sec) ||
390 (t.tv_sec == tm.t.tv_sec && t.tv_usec >= tm.t.tv_usec))
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
#define DEFAULT_FORMAT_DATE
Class for smart character strings.
Class for representation of a time.
void getValue(struct timeval *tv) const
Get time in a struct timeval.
SbBool operator>=(const SbTime &tm) const
Relational (greater than or equal to) operator.
static void usleep(size_t usec)
Sleep for specified time (in microsec).
SbTime & operator*=(double s)
Destructive multiplication by scalar.
SbBool operator<(const SbTime &tm) const
Relational (less than) operator.
SbString format(const char *fmt="%S.%i") const
Convert to a string.
SbTime(time_t sec, long usec)
Constructor taking seconds and microseconds.
SbTime & operator-=(const SbTime &tm)
Subtraction of two times which modifies the time structure.
static SbTime maxTime()
Get a time far, far into the future.
double getValue() const
Get time in seconds as a double.
int operator==(const SbTime &tm) const
Equality operator.
int operator!=(const SbTime &tm) const
Inequality operator.
SbTime()
Default constructor.
SbBool operator<=(const SbTime &tm) const
Relational (less than or equal to) operator.
SbTime & operator+=(const SbTime &tm)
Addition of two times which modifies the time structure.
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.
friend SbTime operator+(const SbTime &t0, const SbTime &t1)
Addition of two times.
friend SbTime operator/(const SbTime &tm, double s)
Division by scalar.
SbTime(double sec)
Constructor taking seconds.
SbBool operator>(const SbTime &tm) const
Relational (greater than) operator.
void setToTimeOfDay()
Set to the current time (seconds since Jan 1, 1970).
void setValue(const struct timeval *tv)
Set time from a struct timeval.
static SbTime max()
Deprecated.
SbTime & operator/=(double s)
Destructive division by scalar.
SbString formatDate(const char *fmt=DEFAULT_FORMAT_DATE) const
Convert to a date string, interpreting the time as seconds since Jan 1, 1970.
void setValue(double sec)
Set time from a double (in seconds).
SbTime(const struct timeval *tv)
Constructor taking a struct timeval.
void setValue(time_t sec, long usec)
Set time from seconds + microseconds.
SbTime operator%(const SbTime &tm) const
Modulus for two times (remainder when time1 is divided by time2).
static SbTime getTimeOfDay()
Get the current time (seconds since Jan 1, 1970).
void getValue(time_t &sec, long &usec) const
Get time in seconds and microseconds.
friend SbTime operator*(const SbTime &tm, double s)
Multiplication by scalar.
friend SbTime operator-(const SbTime &t0, const SbTime &t1)
Subtraction of two times.
static void sleep(const int msec)
Sleep for specified time (in msec).