Without this the following asserts fires.
The root cause is unclear.

--- glib-2.82.0/glib/tests/timer.c.orig
+++ glib-2.82.0/glib/tests/timer.c
@@ -27,6 +27,7 @@
 #define GLIB_DISABLE_DEPRECATION_WARNINGS 1
 
 #include "glib.h"
+#include <stdio.h>
 
 static void
 test_timer_basic (void)
@@ -77,6 +78,8 @@
   g_usleep (100);
   elapsed2 = g_timer_elapsed (timer, NULL);
 
+  printf("elapsed: %f\n", elapsed);
+  printf("elapsed2: %f\n", elapsed2);
   g_assert_cmpfloat (elapsed, ==, elapsed2);
 
   g_timer_destroy (timer);