#include <Time.H>
|
static char | timeFormat [] |
| The time format to use for converting seconds to a human readable time. More...
|
|
Cross platform time.
- Examples:
- TimeTest.C.
Definition at line 41 of file Time.H.
◆ Time() [1/2]
◆ Time() [2/2]
Time::Time |
( |
long |
sec, |
|
|
long |
usec |
|
) |
| |
|
inline |
Construct and initialise the time.
- Parameters
-
sec | The seconds component of the time. |
usec | The micro-seconds component of the time. |
Definition at line 51 of file Time.H.
◆ ~Time()
◆ getSecs()
glong Time::getSecs |
( |
| ) |
const |
|
inline |
get sex : returns the seconds component of the time variable.
- Returns
- the seconds value of the private time variable.
- Examples:
- TimeTest.C.
Definition at line 61 of file Time.H.
◆ getTime()
Get the current time.
- Returns
- A reference to this object for use with operators.
Definition at line 71 of file Time.H.
◆ getTimeString() [1/2]
static string Time::getTimeString |
( |
| ) |
|
|
inlinestatic |
Get a textual representation of the current time. Uses the timeFormat string to format the time into a string.
- Returns
- the time as a string, and empty string on error
Definition at line 122 of file Time.H.
◆ getTimeString() [2/2]
static string Time::getTimeString |
( |
char * |
formatStr | ) |
|
|
inlinestatic |
Get a textual representation of the current time.
- Parameters
-
formatStr | the format to use when turning the time into a string, if NULL, then use timeFormat. |
- Returns
- the time as a string, and empty string on error
Definition at line 130 of file Time.H.
◆ getUSecs()
glong Time::getUSecs |
( |
| ) |
const |
|
inline |
get u sex : returns the micro-seconds component of the time variable.
- Returns
- the seconds value of the private time variable.
Definition at line 66 of file Time.H.
◆ operator+()
Addition operator : add the provided time from the local time variable.
- Parameters
-
- Returns
- this time plus the provided time.
Definition at line 97 of file Time.H.
◆ operator+=()
Time& Time::operator+= |
( |
const Time & |
t | ) |
|
|
inline |
Addition and assign operator : add the provided time from the local time variable.
- Parameters
-
- Returns
- A reference to this Time class, where this time plus the provided time.
Definition at line 105 of file Time.H.
◆ operator-()
Subtraction operator : subtract the provided time from the local time variable.
- Parameters
-
- Returns
- this time minus the provided time.
Definition at line 80 of file Time.H.
◆ operator-=()
Time& Time::operator-= |
( |
const Time & |
t | ) |
|
|
inline |
Subtract and assign operator : subtract the provided time from the local time variable.
- Parameters
-
- Returns
- A reference to this Time class, this time minus the provided time.
Definition at line 88 of file Time.H.
◆ operator<<
ostream& operator<< |
( |
ostream & |
o, |
|
|
const Time & |
t |
|
) |
| |
|
friend |
◆ time
The documentation for this class was generated from the following file:
- /tmp/gtkiostream/include/Time.H