Struct

GLibTimeVal

Description [src]

struct GTimeVal {
  glong tv_sec;
  glong tv_usec;
}

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 GTimeVal is subject to the year 2038 problem.

Structure members
tv_sec

Seconds.

tv_usec

Microseconds.

Deprecated since:2.62

Use GDateTime or #guint64 instead.

Functions

g_time_val_from_iso8601

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

Available since: 2.12

Deprecated since: 2.62

Instance methods

g_time_val_add

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

Deprecated since: 2.62

g_time_val_to_iso8601

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.

Available since: 2.12

Deprecated since: 2.62