glib.time_val

Module for [TimeVal] struct

struct TimeVal

Types 1

structTimeVal

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.

Deprecated

Use #GDateTime or #guint64 instead.
Fields
glong tvSecseconds
glong tvUsecmicroseconds
Methods
void add(glong microseconds)Adds the given number of microseconds to time. microseconds can also be negative to decrease the value of time.
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.
bool fromIso8601(string isoDate, out glib.time_val.TimeVal time)Converts a string containing an ISO 8601 encoded date and time to a #GTimeVal and puts it into time_.