#include <Inventor/SbTime.h>
Public Methods | |
SbTime (void) | |
SbTime (const double sec) | |
SbTime (const int32_t sec, const long usec) | |
SbTime (const struct timeval *const tv) | |
void | setToTimeOfDay (void) |
void | setValue (const double sec) |
void | setValue (const int32_t sec, const long usec) |
void | setValue (const struct timeval *const tv) |
void | setMsecValue (const unsigned long msec) |
double | getValue (void) const |
void | getValue (time_t &sec, long &usec) const |
void | getValue (struct timeval *tv) const |
unsigned long | getMsecValue (void) const |
SbString | format (const char *const fmt="%S.%i") const |
SbString | formatDate (const char *const fmt="%A,%D%r") const |
SbBool | parsedate (const char *const date) |
SbTime & | operator+= (const SbTime &tm) |
SbTime & | operator-= (const SbTime &tm) |
SbTime | operator- (void) const |
SbTime & | operator *= (const double s) |
SbTime & | operator/= (const double s) |
double | operator/ (const SbTime &tm) const |
SbTime | operator% (const SbTime &tm) const |
int | operator== (const SbTime &tm) const |
int | operator!= (const SbTime &tm) const |
SbBool | operator< (const SbTime &tm) const |
SbBool | operator> (const SbTime &tm) const |
SbBool | operator<= (const SbTime &tm) const |
SbBool | operator>= (const SbTime &tm) const |
void | print (FILE *fp) const |
Static Public Methods | |
SbTime | getTimeOfDay (void) |
SbTime | zero (void) |
SbTime | max (void) |
SbTime | maxTime (void) |
Friends | |
COIN_DLL_API SbTime | operator+ (const SbTime &t0, const SbTime &t1) |
COIN_DLL_API SbTime | operator- (const SbTime &t0, const SbTime &t1) |
COIN_DLL_API SbTime | operator * (const double s, const SbTime &tm) |
COIN_DLL_API SbTime | operator * (const SbTime &tm, const double s) |
COIN_DLL_API SbTime | operator/ (const SbTime &tm, const double s) |
SbTime is a convenient way of doing system independent representation and calculations on time values of high resolution.
|
The default constructor sets up a time instance of 0 seconds. |
|
Construct and initialize an SbTime instance to a time specified as sec seconds. |
|
Construct and initialize an SbTime instance to a date and time sec number of seconds and usec number of microseconds. |
|
Construct and initialize an SbTime instance to the date and time given by the struct timeval. For information on the timeval structure, please consult your system developer documentation. |
|
Returns an SbTime instance with the current clock time. The current time will be given as a particular number of seconds and microseconds since 00:00:00.00 January 1st 1970.
|
|
Set this SbTime to be the current clock time. The current time will be given as a particular number of seconds and microseconds since 00:00:00.00 1st January 1970.
|
|
Returns an SbTime instance representing zero time.
|
|
Returns an SbTime instance representing the maximum representable time/date. This method is not available under MSWindows, as max() crashes with a define macro Microsoft has polluted the global namespace with.
|
|
Returns an SbTime instance representing the maximum representable time/date.
|
|
Reset an SbTime instance to sec number of seconds.
|
|
Reset an SbTime instance to sec number of seconds and usec number of microseconds.
|
|
Reset an SbTime instance to the date and time given by the timeval struct. For information on the timeval struct, please consult your developer system documentation.
|
|
Set the time by msec number of milliseconds.
|
|
Return time as number of seconds.
|
|
Return number of seconds and microseconds which the SbTime instance represents.
|
|
Returns the time as a timeval structure. For information on the timeval structure, please consult your system developer documentation.
|
|
Return number of milliseconds which the SbTime instance represents.
|
|
Uses the formatting specified below to return a string representation of the stored date/time. Any format specifiers must be prefixed with a '%' symbol, any other text in the format string fmt will be copied directly to the resultant SbString.
%% - insert a single '%'.
|
|
Accepts the formatting identifiers specified by the POSIX strftime() function to return a string representation of the stored date. Check your reference documentation for strftime() for information on the format modifiers available. Note that the formatting characters for strftime() is different on UNIX systems and Microsoft Windows. The value of SbTime will be interpreted as seconds since 00:00:00 1970-01-01.
|
|
This method takes a date string and converts it to the internal SbTime format. The date string must conform to one of three formats, namely the RFC 822 / RFC 1123 format (Wkd, DD Mnth YYYY HH:MM:SS GMT), the RFC 850 / RFC 1036 format (Weekday, DD-Mnth-YY HH:MM:SS GMT), or the asctime() format (Wkdy Mnth D HH:MM:SS YYYY). Feeding an invalid date string to this method will make it return FALSE. |
|
Add tm to time value and return reference to self. |
|
Subtract tm from time value and return reference to self. |
|
Return the negated time. |
|
Multiply time value with s and return reference to self. |
|
Divide time value with s and return reference to self. |
|
Find the factor between this SbTime and the one given in tm, and return the result. |
|
Returns the remainder time when dividing on tm. |
|
Check if the time value is equal to that of tm. |
|
Check if the time value is not equal to that of tm. |
|
Compares with tm and return TRUE if less. |
|
Compares with tm and return TRUE if larger than. |
|
Compares with tm and return TRUE if less or equal. |
|
Compares with tm and return TRUE if larger or equal. |
|
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. |
|
Add the two SbTimes and return the result. |
|
Subtract t1 from t0 and return the result. |
|
Multiply time value tm with s and return result. |
|
Multiply time value tm with s and return result. |
|
Divide time value tm with s and return result. |