mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 23:58:54 +02:00
Add 'GTimeSpec' as 'struct timespec' equivalent
This commit is contained in:
@@ -1319,6 +1319,9 @@ g_time_val_add
|
|||||||
g_time_val_from_iso8601
|
g_time_val_from_iso8601
|
||||||
g_time_val_to_iso8601
|
g_time_val_to_iso8601
|
||||||
|
|
||||||
|
<SUBSECTION>
|
||||||
|
GTimeSpec
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
GDate
|
GDate
|
||||||
GTime
|
GTime
|
||||||
|
@@ -134,6 +134,14 @@ length of the sleep.
|
|||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### STRUCT GTimeSpec ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@tv_sec:
|
||||||
|
@tv_nsec:
|
||||||
|
|
||||||
<!-- ##### STRUCT GDate ##### -->
|
<!-- ##### STRUCT GDate ##### -->
|
||||||
<para>
|
<para>
|
||||||
Represents a day between January 1, Year 1 and a few thousand years in
|
Represents a day between January 1, Year 1 and a few thousand years in
|
||||||
|
@@ -1812,6 +1812,15 @@ g_get_current_time (GTimeVal *result)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GTimeSpec:
|
||||||
|
*
|
||||||
|
* Represents a precise time, with seconds and nanoseconds. This is
|
||||||
|
* similar to POSIX <structname>struct timespec</structname>.
|
||||||
|
*
|
||||||
|
* Since: 2.28
|
||||||
|
**/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_main_dispatch_free (gpointer dispatch)
|
g_main_dispatch_free (gpointer dispatch)
|
||||||
{
|
{
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include <glibconfig.h>
|
#include <glibconfig.h>
|
||||||
#include <glib/gmacros.h>
|
#include <glib/gmacros.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -423,6 +424,14 @@ struct _GTimeVal
|
|||||||
glong tv_usec;
|
glong tv_usec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct _GTimeSpec GTimeSpec;
|
||||||
|
|
||||||
|
struct _GTimeSpec
|
||||||
|
{
|
||||||
|
time_t tv_sec;
|
||||||
|
glong tv_nsec;
|
||||||
|
};
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
/* We prefix variable declarations so they can
|
/* We prefix variable declarations so they can
|
||||||
|
Reference in New Issue
Block a user