mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 01:18:53 +02:00
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:
@@ -544,9 +544,11 @@ GLIB_AVAILABLE_IN_ALL
|
||||
void g_source_remove_child_source (GSource *source,
|
||||
GSource *child_source);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
GLIB_DEPRECATED_IN_2_28_FOR(g_source_get_time)
|
||||
void g_source_get_current_time (GSource *source,
|
||||
GTimeVal *timeval);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint64 g_source_get_time (GSource *source);
|
||||
|
Reference in New Issue
Block a user