mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 04:44:16 +02:00
Bug 527214 – g_timer_elapsed() returns random values.
* glib/gtimer.c (g_timer_new()): Print warning if g_thread_init() has not been called yet. Patch by Mathias Hasselmann svn path=/trunk/; revision=6907
This commit is contained in:
@@ -69,6 +69,10 @@ g_timer_new (void)
|
||||
{
|
||||
GTimer *timer;
|
||||
|
||||
if (!g_thread_supported ())
|
||||
g_warning ("g_timer_new() called, but GThreads not initialized yet. "
|
||||
"Call g_thread_init ().");
|
||||
|
||||
timer = g_new (GTimer, 1);
|
||||
timer->active = TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user