TimeVal

Represents a precise time, with seconds and microseconds.

Similar to the struct timeval returned by the gettimeofday() UNIX system call.

GLib is attempting to unify around the use of 64-bit integers to represent microsecond-precision time. As such, this type will be removed from a future version of GLib. A consequence of using glong for tv_sec is that on 32-bit systems glib.time_val.TimeVal is subject to the year 2038 problem.

More...

Members

Functions

add
void add(glong microseconds)

Adds the given number of microseconds to time_. microseconds can also be negative to decrease the value of time_.

toIso8601
string toIso8601()

Converts time_ into an RFC 3339 encoded string, relative to the Coordinated Universal Time (UTC). This is one of the many formats allowed by ISO 8601.

Static functions

fromIso8601
bool fromIso8601(string isoDate, glib.time_val.TimeVal time)

Converts a string containing an ISO 8601 encoded date and time to a #GTimeVal and puts it into time_.

Detailed Description

Deprecated: Use #GDateTime or #guint64 instead.