]> code.delx.au - pulseaudio/commitdiff
glib: Stop using g_source_get_current_time()
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 28 Jun 2012 14:01:37 +0000 (19:31 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 28 Jun 2012 14:30:00 +0000 (20:00 +0530)
This function is now marked as deprecated. It is functionally identical
to g_get_current_time(), so we use that instead. The GLib API docs
suggest g_source_get_time(), but that does not provide wallclock time
(which is what the pa_time_event API expects), so we don't use it.

src/pulse/glib-mainloop.c

index 35c9c6a2d1a92d7665ff8b3557f94ecf78f0d521..bd24913b465cff0069ccf362fd897ac32e0a5c63 100644 (file)
@@ -489,7 +489,7 @@ static gboolean prepare_func(GSource *source, gint *timeout) {
         t = find_next_time_event(g);
         g_assert(t);
 
-        g_source_get_current_time(source, &now);
+        g_get_current_time(&now);
         tvnow.tv_sec = now.tv_sec;
         tvnow.tv_usec = now.tv_usec;
 
@@ -520,7 +520,7 @@ static gboolean check_func(GSource *source) {
         t = find_next_time_event(g);
         g_assert(t);
 
-        g_source_get_current_time(source, &now);
+        g_get_current_time(&now);
         tvnow.tv_sec = now.tv_sec;
         tvnow.tv_usec = now.tv_usec;
 
@@ -565,7 +565,7 @@ static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer us
         t = find_next_time_event(g);
         g_assert(t);
 
-        g_source_get_current_time(source, &now);
+        g_get_current_time(&now);
         tvnow.tv_sec = now.tv_sec;
         tvnow.tv_usec = now.tv_usec;