gtypes: Deprecate GTimeVal in favour of guint64 or GDateTime

GTimeVal is subject to the year 2038 problem, since its `tv_sec` field
is a `glong`, which is 32 bits on 32-bit platforms.

Use `guint64` to represent microsecond-precision time since the Unix
epoch; or use `GDateTime` for full date/time representation.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1438
This commit is contained in:
Philip Withnall
2019-06-14 12:30:11 +01:00
parent e357619d24
commit e3f88f311f
4 changed files with 8 additions and 2 deletions

View File

@@ -110,12 +110,14 @@ GLIB_AVAILABLE_IN_2_46
void g_async_queue_push_front_unlocked (GAsyncQueue *queue,
gpointer item);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop)
gpointer g_async_queue_timed_pop (GAsyncQueue *queue,
GTimeVal *end_time);
GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop_unlocked)
gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
GTimeVal *end_time);
G_GNUC_END_IGNORE_DEPRECATIONS
G_END_DECLS