Glib::TimeVal Struct Reference
Glib::TimeVal is a wrapper around the glib structure GTimeVal. More...
Inherits GTimeVal.
List of all members.
Detailed Description
Glib::TimeVal is a wrapper around the glib structure GTimeVal.
The glib structure GTimeVal itself is equivalent to struct timeval, which is returned by the gettimeofday() UNIX call. Additionally this wrapper provides an assortment of time manipulation functions.
Constructor & Destructor Documentation
Glib::TimeVal::TimeVal |
( |
|
) |
[inline] |
Glib::TimeVal::TimeVal |
( |
long |
seconds, |
|
|
long |
microseconds | |
|
) |
| | [inline] |
Glib::TimeVal::TimeVal |
( |
const GTimeVal & |
gtimeval |
) |
[inline] |
Member Function Documentation
void Glib::TimeVal::add |
( |
const TimeVal& |
rhs |
) |
|
void Glib::TimeVal::add_microseconds |
( |
long |
microseconds |
) |
|
void Glib::TimeVal::add_milliseconds |
( |
long |
milliseconds |
) |
|
void Glib::TimeVal::add_seconds |
( |
long |
seconds |
) |
|
double Glib::TimeVal::as_double |
( |
|
) |
const [inline] |
Returns a double representation of the time interval.
This member function converts the time interval, that is internally stored as two long values for seconds and microseconds, to a double representation, whose unit is seconds.
Returns an ISO 8601 encoded string, relative to the Coordinated Universal Time (UTC).
- Since glibmm 2.22:
void Glib::TimeVal::assign_current_time |
( |
|
) |
|
Assigns the current time to the TimeVal instance.
Equivalent to the UNIX gettimeofday() function, but is portable and works also on Win32.
bool Glib::TimeVal::assign_from_iso8601 |
( |
const Glib::ustring& |
iso_date |
) |
|
Converts a string containing an ISO 8601 encoded date and time to a Glib::TimeVal and puts it in TimeVal instance.
- Parameters:
-
| iso_date | ISO 8601 encoded string. |
- Returns:
true
if conversion was successful.
- Since glibmm 2.22:
bool Glib::TimeVal::negative |
( |
|
) |
const [inline] |
TimeVal& Glib::TimeVal::operator+= |
( |
long |
seconds |
) |
[inline] |
TimeVal& Glib::TimeVal::operator+= |
( |
const TimeVal& |
gtimeval |
) |
[inline] |
TimeVal& Glib::TimeVal::operator-= |
( |
long |
seconds |
) |
[inline] |
TimeVal& Glib::TimeVal::operator-= |
( |
const TimeVal& |
gtimeval |
) |
[inline] |
TimeVal& Glib::TimeVal::operator= |
( |
const GTimeVal & |
gtimeval |
) |
[inline] |
void Glib::TimeVal::subtract |
( |
const TimeVal& |
rhs |
) |
|
void Glib::TimeVal::subtract_microseconds |
( |
long |
microseconds |
) |
|
void Glib::TimeVal::subtract_milliseconds |
( |
long |
milliseconds |
) |
|
void Glib::TimeVal::subtract_seconds |
( |
long |
seconds |
) |
|
bool Glib::TimeVal::valid |
( |
|
) |
const [inline] |
Checks whether the stored time interval is positive.
Returns true if the stored time / time interval is positive.
Friends And Related Function Documentation
The documentation for this struct was generated from the following file: